Questions tagged [logfile]

A log file is a file that contains a list of events, which have been "logged" by a computer.

A log file is a file that contains a list of events, which have been "logged" by a computer. Log files are often generated during software installations and are created by Web servers, but they can be used for many other purposes as well. Most log files are saved in a plain text format, which minimizes their file size and allows them to be viewed in a basic text editor.

701 questions
1
vote
1 answer

cronjob python script output to file

I run a simple python script by crontab in a CentOS 7.x server. This is the code: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin #MAILTO=root MAILTO=my_email_address 00 15 * * * root /usr/bin/python ./home/python_devs/run_program.py >>…
R99Photography
  • 71
  • 1
  • 2
  • 10
1
vote
2 answers

trimming log file between two line

I writing one python script to trim log file between two line. here is the I have written: import optparse import datetime parser = optparse.OptionParser() parser.add_option("-f","--file",dest="log_file", …
pgyogesh
  • 342
  • 2
  • 13
1
vote
0 answers

python telnet and put the message in a particular log file

hi I am coding the python script to login telnet and it has to write log file to op.txt the absolute path is /netperf/mntpt/array1/home/prg_use/op.txt the python code ptlog.py import getpass import sys import telnetlib import time host…
lin Joe
  • 82
  • 1
  • 9
1
vote
0 answers

custom log file for angular 2/4 project

I need to add a log file to my angular 2 projects which stores info, error log in the file like log.txt file how to create service which creates and write log to file using typescript
1
vote
2 answers

Going through files in a directory & performing actions on them given date range as a parameter to go through the files between the dates specified?

I have a directory which contains access_log files for an altassian product. The files are named as access_log.2017-11-02 an example. I have log parser written in bash which I am using to parse all the data to a .csv file but I am unable to think of…
Manish Jha
  • 33
  • 5
1
vote
0 answers

How to setup logging within a python module, which automatically rotates log file after successful execution of all the components of a module?

I have created a module having various scripts in the root as well as the sub-folders. I was previously creating a logging script which defined a central logger instance and I was using RotatedFileHandler for creating the log file. The problem is I…
1
vote
1 answer

How to inherit from twisted.logger.Logger?

I have a tcp server with Twisted, and each client has a log file. So I inherit from twisted.logger.Logger. from twisted.logger import Logger, textFileLogObserver from twisted.python.logfile import LogFile class LALogger(Logger): …
lakerszhy
  • 11
  • 2
1
vote
0 answers

CMake log files missing "Elapsed time" in some files only

In my vastly complicated project I'm on at my work, I'm trying to add a post-build python script that analyze the log files, that seeks for: 1> Build started DATE TIME 1> Elapsed time XXXXXX that is displayed in the build output window in visual…
1
vote
2 answers

Where do I find my whenever log files?

I'm using the whenever gem for Rails 5. I'm trying to troubleshoot an issue, and after my default schedule.rb file was created at config/schedule.rb, I added some logging directives # Learn more: http://github.com/javan/whenever set :environment,…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
1 answer

IntelliJ logs to file with wrong encoding

I use the IntelliJ Save console output to file feature. (Run configuration -> Log tab) But it looks like the encoding is wrong: In the console, I can see non-ascii-characters like "äöü", whereas in the output file, they get replaces by question…
Sebastian
  • 5,721
  • 3
  • 43
  • 69
1
vote
2 answers

regex capture group which might not be present

I'm running a regex through some log files. The capture groups should capture some relevant fields. I'd like to know if the logfile mentions a successful ending of the job or not. This can be concluded by the presence or absence of the string "Job…
Dean
  • 13
  • 3
1
vote
1 answer

I want to save eclipse console log into a string

I just need to save Eclipse's Console/Terminal content into a string or a file. I have researched a lot on this issue and what I only got is how set up the Logger to print on a file, which is not what I want. What I want exactly is to print the…
MSOUFAN
  • 101
  • 2
  • 12
1
vote
1 answer

Search For String In File Using Variables

Having some trouble searching a log file. I have a basic script that searches for specific text in a log file. The problem is, I am trying to use variables that can be adjusted by the user at the command line but I cannot get them to be recognized.…
James Pi
  • 71
  • 9
1
vote
1 answer

Accessing and monitoring log file in POX controller

I want to do some analysis on log file in POX controller and I have to do it online. For that, I need the log file of this controller that accumulates online. (For example recording information while h1 ping h2) Can any body help me to find the log…
Saeid
  • 1,996
  • 4
  • 27
  • 44
1
vote
1 answer

tail -f log file timestamp

Good afternoon. I have log file that gets populated throughout the day as a number of scripts run at various times. It's not a huge file but one problem is that the log entries do not have timestamps for time of entry. This being the case, I…
phamalda
  • 7
  • 1
  • 4