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.

612 questions
229
votes
21 answers

Intellisense and code suggestion not working in Visual Studio 2012 Ultimate RC

I have just downloaded and installed Visual Studio 2012 Ultimate RC, but I'm having an issue with the intellisense: it does not work until I press Ctrl+Space. Code suggestions are disabled also (method parameters for example). I think the problem…
h_djebli
  • 2,569
  • 2
  • 14
  • 14
187
votes
34 answers

Get last n lines of a file, similar to tail

I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file. The items in the file are line based with the newest item at the bottom. So I need a tail() method that can read n lines from the…
Armin Ronacher
  • 30,242
  • 12
  • 62
  • 69
90
votes
9 answers

how to create a logfile in php?

I want to create a logfile for my system to register/log every action they do inside the system. But I have no idea how to do it. For example, I have this php code that does the login function. public function hasAccess($username,$password){ …
maecy m
  • 1,097
  • 2
  • 11
  • 20
87
votes
2 answers

Logging to two files with different settings

I am already using a basic logging config where all messages across all modules are stored in a single file. However, I need a more complex solution now: Two files: the first remains the same. The second file should have some custom format. I have…
marw
  • 2,329
  • 3
  • 26
  • 36
27
votes
6 answers

Node.js console.log() in txt file

I have another question (last question). At the moment i am working on a Node.js project and in this I have many console.log() functions. This has worked okay so far but I also want everything that's written to the console to also be written in a…
Limatuz
  • 496
  • 2
  • 5
  • 10
26
votes
4 answers

Nginx cannot write into access.log

When nginx start, it creates log file "access.log" with 0 size. But no log are written in it. error.log works fine. nginx.conf: http { access_log /usr/local/webserver/nginx/logs/access.log combined; .... } The logs file is: -rw-r--r-- 1…
Seth
  • 398
  • 2
  • 6
  • 10
20
votes
1 answer

Where is the default zsh history file?

HISTFILE isn't set in my .zshrc file. To which file is zsh history saved by default? Or, is the history just being stored in memory?
ma11hew28
  • 106,283
  • 107
  • 420
  • 616
20
votes
7 answers

Xampp - Apache Shuts Down Unexpectedly, Empty Log File And No Events

I have XAMPP installed on my machine. I am trying to run Apache from the XAMPP Control Panel. I start the XAMPP Control Panel by right-clicking the shortcut and selecting "Run as administrator" (I am logged in on an account with Administrator…
Jan Tacci
  • 2,931
  • 16
  • 56
  • 82
16
votes
2 answers

Forever log and logrotate

I use forever to launch my nodeJs server and I choose the log file : forever -l /home/api/log/api_output.log start server.js I use logrotate to move logfile every day (like advise here : NodeJS/Forever archive logs), after one day my directory is…
igor
  • 465
  • 1
  • 4
  • 14
15
votes
3 answers

How can I follow a file like "Tail -f" does in Java without holding the file open (Prevent rename/delete)

i'd like to "Tail -f" a lot of logfiles from within a java app. I've gotten this to work by monitoring the size and last update and repeatedly opening the file and reading the last few bytes whenever the file size or last update time changes--then…
Bill K
  • 60,031
  • 14
  • 96
  • 147
14
votes
1 answer

how to output success or failure of cp command to file

I'm going to be running a shell script containing a CP command using a scheduled cron job. I would like to include in the script something to output to a log file whether the copy was successful or failed. Appreciate any advice in advance. Thanks
user2841861
  • 405
  • 2
  • 5
  • 19
10
votes
7 answers

How to append hostname to log file in log4j.xml

I want to append hostname and date to log file name.So log file Name should be like app_hostname.date.log. Note: This should run in both linux and windows.
Prasanna Kumar H A
  • 2,923
  • 4
  • 20
  • 46
10
votes
3 answers

Debugging Stack overflow errors on background services

This is not really a question, but an answer which would hopefully help other people. Those who've written a windows service before, know what a mission it could be to find a bug in it, particularly if it only happens on the live environment. In my…
hannodb
  • 193
  • 11
10
votes
3 answers

Disable logging in a node.js script running with forever

I am continually running a few server scripts (on different ports) with nodejs using forever. There is a considerable amount of traffic on some of these servers. The console.log commands I have for tracking connection anomalies result in bloated log…
Cubis
  • 277
  • 2
  • 10
9
votes
2 answers

Windows Log File Viewer (Tail) that displays lines in reverse order

I am looking for a free Windows GUI log file viewer that can display lines in reverse order with the newest lines at the top of the screen. Bonus points if it has an indication that there has been an update to the file. Open source also a plus but…
Automate
  • 175
  • 1
  • 9
1
2 3
40 41