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

counting database hits by user type in python

I have a reverse access log file that I've processed to just be the url hit and user type. I need to count the number of times a given url is hit by each of the user types. sample data: http://find.galegroup.com:80/ staff …
user10295345
-1
votes
1 answer

How to extract log using bash script between a date / time and another

have a 3 logfiles and need to extract via bash a period, however it does not identify the file as date / time. Can anyone help me with how would a script using sed or awk or even grep get a log from YYYY / MM / DD HH: MM: ss to YYYY / MM / DD HH:…
-1
votes
2 answers

How to remove the log info (TimeStamp etc.) from log file

I have a log file which contains stuff like: 2019-04-03 22:30:16,772 [pool-9-thread-1] INFO wire.CampaignManagement: --> POST https://foo.com 2019-04-03 22:30:16,772 [pool-9-thread-1] INFO wire.CampaignManagement: Content-Type: application/json;…
Raj
  • 3,637
  • 8
  • 29
  • 52
-1
votes
1 answer

I need to add the log file to my code in order to convert the exception into text document

My code stops automatically and I am not getting the cause behind it. So I need to add the log file in order to capture the exception message and save it in text document format in my machine. public void objInsurityTimer_Elapsed(object sender,…
-1
votes
1 answer

check for a value in a file and remove lines less than that value in that file and keep remaining lines. in laravel

I have a log file which keeps on updating every minute which also has an auto increment value. For the first time, I will read the data and insert into database along with the last auto increment value in that file. For the second time, I am able to…
-1
votes
1 answer

Formatting log file output in python

I am writing a python script to cat and grep a log file similar to linux command cat logfile | grep " Finished processing" Currently with open("logfile",'r') as f: output= [line for line in f.read().strip().split('\n') if "Finished processing"…
nits
  • 73
  • 2
  • 8
-1
votes
1 answer

Streamwriter overrides line

Program: An image gets shown, for this image the user can select different radiobuttons options, when user submits, image path and the values of radiobuttons gets written in the logfile. Problem: The streamwriter overrides every line, so only the…
Niels
  • 95
  • 2
  • 9
-1
votes
1 answer

How do I make this bat file output the results to a .txt file?

forfiles /p "C:FILEPATH\TO\BE\DELETED\User_1" /s /m *.* /c "cmd /c Del @path" /d -08 forfiles /p "C:FILEPATH\TO\BE\DELETED\User_2" /s /m *.* /c "cmd /c Del @path" /d -08 forfiles /p "C:FILEPATH\TO\BE\DELETED\User_3" /s /m *.* /c "cmd /c Del @path"…
-1
votes
1 answer

How to read DNS query log file

I got a DNS internal query log file and I would like to do analysis on it, so onw record looks like this: 18-Jun-2017 04:00:10.139 client @XXXXXXXXXXXX ip-address#number (ip-address): view internal: query: ip-address IN AAAA + (ip-address in the…
starry1990
  • 121
  • 1
  • 6
-1
votes
1 answer

Python custom search through logfile not returning results

I am using this code to try and pull out lines for log files that include key words. However the files and lines I know that contain these words aren't written into the new error files. I originally thought my problem was because of a difference in…
-1
votes
2 answers

Parse log file in python

I got a logs file with structure like this and need parse that in python: 10.243.166.74, 10.243.166.74 - - [08/Feb/2017:16:33:26 +0100] "GET /script/header_footer.js?_=1486568008442 HTTP/1.1" 200 2143 "http://www.trendtron.com/popmenu/home"…
jovicbg
  • 1,523
  • 8
  • 34
  • 74
-1
votes
1 answer

How to mainain log file in java

I want to store(append) output of my java code after every execution in the same file. Like including the SOP statements, execution time , no of files executed etc.
Rakhi Oza
  • 75
  • 1
  • 8
-1
votes
1 answer

decoded snort logs

I used this command : $ snort -b -l /home/username/snort-2.9.9.0/snort_logs to log snort packets, but it give me ASCII format .. I want the log file in a normal text format,How can i do this? Thanks
Dalya
  • 374
  • 1
  • 3
  • 15
-1
votes
2 answers

How to parse only the beginning of this log from messages

2015-05-22 16:46:46,985 - __main__ - INFO - Starting to Wait for Files 2015-05-22 16:46:56,645 - __main__ - INFO - Starting: Attempt 1 Checking for New Files from gs://folder/folder/ 2015-05-22 16:47:46,488 - __main__ - INFO - Success: Downloading…
-1
votes
1 answer

Parse log files for relevant data from multiple lines

C#, Winforms: I have a log file I need to parse. This file contains transactions requests from a program, but the program writes the transaction across multiple lines. I need to get the ID# and if the request was processed or denied for whatever…
ShoTo
  • 153
  • 1
  • 10