Questions tagged [filehandler]

File handlers are mechanisms which provide abstraction over primitive file operations.

File handlers are modules (e.g. classes) which wrap primitive file operations (e.g. read, write) and file system operations (e.g. unlink, move, file watching) in helpful abstractions for specific usage scenarios.

For example, a file handler implemented as a class in opens a file in the format, reads each entry, and populates a list of row objects. In this case, the file handler has wrapped the open and read calls so the the caller need only know the name of the file.

Questions relating to the development of custom file handlers should include this tag. Additionally, questions which involve the use of standard or third-party file handlers may also include this tag.

See also:

147 questions
1
vote
1 answer

Spring rest controller not working for file upload

I have tried a rest api without any View with mongodb. My application is working fine with Spring boot embedded server with no error. With standalone tomcat application is running without error but cannot access @RestController mapped url. It shows…
1
vote
1 answer

Custom rotator and namer functions not working with RotatingFileHandler logger handler in python?

I have referred below link for using rotator and namer functions, but they are not working(not making any difference) Link: https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing I want…
charanReddy
  • 137
  • 1
  • 11
1
vote
3 answers

java logger single file multiple classes

I have three classes and I want to add the logs to a shared single file. So the constructor of each class has a fh = new FileHandler("log.txt", true); LOGGER_A.addHandler(fh); SimpleFormatter formatter = new…
blob
  • 439
  • 8
  • 21
1
vote
1 answer

Getting caller class name for Formatter [Java Logging with File Handler]

I want to add a FileHandler to my logger. And I am also creating a new Formatter(java.util.logging.Formatter) for my FileHandler In the format method…
Ian Lim
  • 47
  • 9
1
vote
3 answers

Can multiple loggers use the same handler?

Is it a good idea to use the same file handler in several loggers? I use the Java logging framework and I want different loggers to write into the same log file, but I don't know if this code example below is a good programming style. import…
Nurettin Armutcu
  • 335
  • 4
  • 10
1
vote
1 answer

Python Logging - closing filehandlers for multiple modules

I'm trying to log info from multiple modules that I've created. I have a main script (main.py) and another module (let's call it mymodule.py). I've set up a logger in each module as follows: logger =…
kronosjt
  • 703
  • 4
  • 10
  • 24
1
vote
1 answer

Java logging with newest log having lowest generation number

I'm using the java.util.logging framework in java build 1.8.0_11-b12 64-bit and have some issues: It seems like the behaviour of my logs has changed. The log file pattern log%g.log is defined in the logging.properties file. Before, the most recent…
1
vote
1 answer

asp.net VB.net file download handler not work properly

I have big file (about 2GB) to distribute to our customer, My website is written by asp.net vb, this is my file download handler: Public Class FileHandler Implements IHttpHandler Public Sub ProcessRequest(ByVal httpcontext As HttpContext)…
Maxime.Pan
  • 13
  • 1
  • 4
1
vote
1 answer

How to Develop Office 365 Custom File Handler

I heard Microsoft provides file handler add-in for custom (non-Microsoft) file types in Office 365. I tried to do this following the tutorial found here, however it seems a bit outdated (although it was last updated in Jan 2017) because several…
elquimista
  • 2,181
  • 2
  • 23
  • 32
1
vote
1 answer

Java rotating logs with constant header

I made some system and now I want to keep track of some statistics about it while it is running. I decided to use TSV form to write down those statistics. While looking for best existing lib (if I could, I'd like to avoid implementing it on my own)…
crollywood
  • 523
  • 1
  • 6
  • 17
1
vote
2 answers

Java Log File creates multiple copies

I am trying to create a logs file in a Java swings application that will contain all the messages generated by the code. But unfortunately it does not create 1 single log file but creates a structure as shown. I need 1 single log file. My code: …
Anuja
  • 409
  • 6
  • 18
1
vote
3 answers

C#: How do I convert a multi-page TIFF via MemoryStream into one long image?

So I have been able to take a multi-page TIFF file and convert it to a single jpeg image but it flattens the TIFF. By flatten it, I mean it only returns the first page. The goal is to retrieve the TIFF (via memory stream), open each page of the TIFF…
Tom Harlin
  • 13
  • 1
  • 5
1
vote
1 answer

What does Java.util.logging do when its FileHandler cannot write to the file?

I've written software that uses Java.util.logging. It runs on a client PC. I'm using a FileHandler to log certain entries to a file. The file resides on on a server. If the server goes away for a bit, then returns (or some other temporary error…
BillS
  • 85
  • 7
1
vote
2 answers

JavaApplicationStub with CFBundleDocumentTypes

I'm trying to use CFBundleDocumentTypes to associate a custom file extension with my application. As far as I can tell, this seems to "work" -- JavaApplicationStub launches my application when I double click the file. However, no callback is…
mystro
  • 347
  • 3
  • 11
1
vote
1 answer

Blueimp Server Side UploadHandler.php -> Where to put custom code

Just tried out the blueimp "out of the box" files. With a few hurdles, I got the plugin to work on my site. In my application, I want to store the uploaded files in specific directories based on the file name. The PHP code to do this is pretty…
Cymro
  • 1,201
  • 1
  • 11
  • 29