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
2
votes
1 answer

Can I make office 365 file handler for existing file format? (docx, xlsx, pptx, ...)

in this link, it says File handlers are a new type of Office add-in that integrate non-Microsoft file types into Office 365 in the same way that that Office file types are. and 'docx' is Microsoft file type, so I think I can't make file handler…
Junho Cha
  • 35
  • 6
2
votes
1 answer

LibGDX "GwtApplication: exception: Couldn't load image 'a.jpg'

Error message: "GwtApplication: exception: Couldn't load image 'a.jpg', file does not exist" The call is: Texture texture; texture =new Texture(Gdx.files.internal("a.jpg")); The application runs normally when ran as desktop application. The file…
Arthur Putnam
  • 1,026
  • 1
  • 9
  • 26
2
votes
1 answer

adding date to Java util logger fileHandler name

Hi I currently have this in my .properties file: java.util.logging.FileHandler.pattern = %h/programName%u%g.log I would also like to append a timestamp / username to this so its easy to identify log files does anyone know how?
Aly
  • 15,865
  • 47
  • 119
  • 191
2
votes
0 answers

How to configure logging handler to produce monthly rotated log files?

I am about to configure a python logging system using the dictconfig format in settings.py as suggested by Django. For effectiveness, I would like to log entries in monthly splitted log files regardless of number of days in the month (or, in the…
Bogey Jammer
  • 638
  • 2
  • 8
  • 23
2
votes
3 answers

Perl - Parse blocks from text file

First, I apologize if you feel this is a duplicate. I looked around and found some very similar questions, but I either got lost or it wasn't quite what I think I need and therefore couldn't come up with a proper implementation. QUESTION: So I have…
Dylan
  • 563
  • 4
  • 15
2
votes
2 answers

Assign hidden field value in ashx page?

I need to assign filename name variable to hidden field value in ashx page, how can I assign value to hidden field in ashx page? .ashx page public void ProcessRequest(HttpContext context) { var file = context.Request.Files[0]; //here i need to…
user1527989
  • 139
  • 4
  • 14
2
votes
1 answer

How to close FileHandlers in thread?

I want to close all FileHandlers once the thread finished or was forcely finished. I created a closeLogger function but it seems it's not being called because I see that the file is still locked in the folder. What is the problem? Can I also handle…
theateist
  • 13,879
  • 17
  • 69
  • 109
1
vote
1 answer

What is the correct way of configuring Python's logging.FileHandler?

I wrote a small-ish Python script that handles nightly conversions and archiving of audio data. Since there have been some unexpected problems along the way (non-existing files, unreliable connection to the database server and so on...), I added…
lubomir.brindza
  • 256
  • 4
  • 11
1
vote
1 answer

How to let root and named loggers's filehandler log to the same file?

My goal is to use java.util.logging(jdk1.6) write all logs to the same log file and do log rotation can use %u in file pattern to avoid potential file conflict with other program I had configured a root logger and several named logger, where root…
Jim Horng
  • 1,587
  • 1
  • 13
  • 23
1
vote
0 answers

C++ PHP Embed load php script from string

I am working on a project to embed PHP in my C++ program. I found the following code. https://github.com/php/php-src/tree/master/sapi/embed I am struggling to find an example that doesn't use a file handler. I need a function where I can pass the…
Krum110487
  • 611
  • 1
  • 7
  • 20
1
vote
1 answer

java.util.logging FileHandler world readable permissions

How to specify the readable by everyone permission on which data is being written by java.util.logging.FileHandler I want to give 755 kind of permission, so that other unix groups can also read these log files.
1
vote
2 answers

Logging module doesn't replace properly my log file when I set mode = 'w' to FileHandler

I'm trying to overwrite the log file every time that I run my program, but instead, it overwrites the file with the outputs the same number of times as I've run the program. Does anyone know why is this happening? If I run the code below once, it…
1
vote
0 answers

python add file logging from multiple modules - new file for every request

I have a service running on flask inside docker, that recieves requests. For every request, i want to export a log file including all logs from all modules in the way. Right now, it is logging constantly to stream using basicConfig, and its…
xGKx
  • 65
  • 2
  • 6
1
vote
1 answer

how to print folder name in python?

I am trying to read multiple folders for a specific text file using glob.glob to search in all folders. I wanted to print only the folder name instead of folder name/file.txt. with open ('input.txt', 'w') as i: for files in glob.glob…
sandy
  • 27
  • 7
1
vote
1 answer

Copy and retain previous output for backup of transformed json data

I have a perl script that transforms json data to perl and saves output in files called teams.txt, backyard, and also a file called backup.txt, where the output of teams.txt is copied from. The following are two snippets from the script/the part of…
Ian Balas
  • 53
  • 4
1 2
3
9 10