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
2
votes
2 answers

Error in OtrosLogViewer

i'm using OtrosLogViewer to analyze my glassfish log file. But it seems the software not working. I think my pattern is…
2
votes
3 answers

powershell if file doesnt exist log string to file

I have many file paths stored in a DB. I need to check if the files actually exist. I've done this before but lost the script for it and need some help. I put all the paths in a text file and want to loop over them, and check if they exist. if they…
Jason Stewart
  • 21
  • 1
  • 2
2
votes
2 answers

How can I extract the latest rows from a log file based on latest date using Powershell

I'm a relatively new Powershell user, and have what I thought was a simple question. I have spent a bit of time looking for similar scenarios and surprisingly haven't found any. I would post my failed attempts, but I can't even get close! I have a…
Ben Allsup
  • 23
  • 5
1
vote
2 answers

Nmake standard output to file

I'm looking for a way to write the standard output of my nmake call to a specified file. I tried something like "nmake target > file.log", but this won't work. Moreover I call multiple nmakes from within my MAKEFILE and may use multiple log-files to…
MrCube
  • 245
  • 2
  • 9
1
vote
0 answers

How do I use toLocaleDateString() and .toLocaleTimeString() to add to my log-file name?

I just trying to save the log file in CSV format with a time stamp in the filename at the end, e.g.: File_YYYMMDD_HHmmSS. How can I make it with a date with toLocaleDateString() and toLocaleDateString(). I could export log-file with…
Matt
  • 11
  • 2
1
vote
1 answer

Retrieve value from previous or following row in PowerBI with PowerQueryM

I'm trying to read in a log file to PowerBI with Power Query. I know there are better options for such an usecase, but I'm searching a solution to achieve this with Power Query or at least DAX! What I want to accomplish is to write information…
Hisager
  • 27
  • 6
1
vote
0 answers

Log file length

I need to read a log file that is currently in use in order to monitor it for changes in length. I’d like to find the length of the log file when I click a button then when the length increases I’d like to know this and scan each line after the…
Jack
  • 41
  • 4
1
vote
1 answer

how to replace while read LINE

I wrote a script to print specific days of a log file ! the script work properly , but I wrote the loop part with while read line and the log file contains more than 150000 items ! the script wants to read it line by line and it takes hours !so,…
Aida E
  • 1,108
  • 2
  • 22
  • 40
1
vote
1 answer

I want to convert .log file to .csv file using python

I have given an alert-handler-error.log file to make analytics on error occurrence. Initially, I have to convert the .log file to CSV or excel file to open it in a data visualization…
sri vidya
  • 15
  • 5
1
vote
2 answers

Convert Logfile to CSV

I would like to request assistance with a Python script to convert a logfile into a csv file. I am looking for the Python code to do this. My input information looks as follows: Exception: Cannot open file…
N K
  • 147
  • 7
1
vote
0 answers

Pytest stops logfile output from being written to disk

I'm developing an API for communication with an FPGA. For testing the API I use Pytest. The API contains a logger that writes output to both the terminal and a file on disk. This all works fine. Now my problem is: when I run the pytests, some of my…
1
vote
2 answers

how to save Event logs into csv file

I'm trying to save the result of log files that I get from Event viewer into a csv file and make sure its not duplicated any suggestions please this my code for reading the log file using System; using System.Text; class Program { static…
1
vote
1 answer

itterate through log file Powershell to grab line A and subsequent lines below until another line A

I have a log file with entries like AA this is a line A CODE C CODE C CODE C AA this is a line A CODE C AA this is a line A CODE C CODE C AA this is a line A So I need to find the first AA this is a line A and grab then all corresponding CODE C…
Bert
  • 11
  • 3
1
vote
1 answer

converting json based log into column format, i.e., one file per column

example for the log file: {"timestamp": "2022-01-14T00:12:21.000", "Field1": 10, "Field_Doc": {"f1": 0}} {"timestamp": "2022-01-18T00:15:51.000", "Field_Doc": {"f1": 0, "f2": 1.7, "f3": 2}} It will generate 5…
sparsh
  • 135
  • 1
  • 1
  • 11
1
vote
1 answer

Writing shell script to extract last 24hrs of a log file: Raspbian on Pi

The log file has the following date format and I was hoping that grep could extract the last 24hrs. I managed to get todays data via grep "22/10/2021" test.txt, but want to setup crontab to execute a script each day that simply selects the last…