03-12-2008
Log4j overwriting logs! ..sometimes...
Hey,
hoping someone here can help me. I'm using log4j for logging in a Java server. Its using DailyRollingFileAppender and rolls every hour. The reason I'm posting here is that in windows it works fine, but in unix it doesnt. What happens is the logs are logged in a file, lets say 'requests'. Then every hour the requests are rolled. so after the first hour of the day we would have the file 'requests-08-03-12-01.log'. Then requests for the current hour will be logged in requests again. Problem is that if we stop the server then restart what happens is that the requests that were currently logged in 'request' get written to the previous log file, overwriting any existing info. This doesnt happen in windows. Also I read about changing directories and it seems to work if we log to a different directory, i.e. it doesnt overwrite anything on restart. So any ideas as to why when we use this directory we have this issue?
Thanks.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows:
""""""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies
2. Shell Programming and Scripting
How to overwrite every time a particular portion of a file?
---------- Post updated at 02:16 PM ---------- Previous update was at 02:07 PM ----------
I have a file whose contents are something like:
Output of "apachectl fullstatus" command:
---------------------------------------------... (3 Replies)
Discussion started by: proactiveaditya
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am starting to do a log4j framework but with unix shell script. So, this framework, will create the log file, will put all info in there, and will close the log file.
He will only work whenever he is called by the father script.
Now, I want him to be able to work with different father... (6 Replies)
Discussion started by: pipoca
6 Replies
4. Shell Programming and Scripting
Hi,
I am new to UNIX and shell scripting.
I have to create a shell script(ksh) which parses log4j.xml file for a given webservice name and change the corresponding value from INFO to DEBUG or vice-versa.
My log4j.xml looks like:-
<!-- Appender WEBSERVICENAME-->
<appender... (3 Replies)
Discussion started by: sanjeevcseng
3 Replies
5. UNIX Desktop Questions & Answers
I have loads of files in different directories which I do miner changed on them and till now I have to create totally new directories for them, specially as I deal with a whole directory at once :wall::wall::wall::wall:
it creates such as mess really
e.g.
FILES="F1/*"
for X in $FILES
do... (2 Replies)
Discussion started by: A-V
2 Replies
6. Shell Programming and Scripting
Hi, An application is transferring a file to linux system with same file name. As file is transferring with same name always file will be overwritten. In this case we want to know what times file was overwirtten like below.
Modify: 2014-05-12 00:52:01.000000000
Modify: 2014-05-12... (2 Replies)
Discussion started by: Satyak
2 Replies
7. UNIX and Linux Applications
Hi Everyone,
We are trying to do a logrotate for "catalina.out" daily, So have used the "copytruncate" option in the logrotate configuration but ended up seeing there was a 0kb file touched with "catalina.out" and the other file with the current date(compressed) file created and seems the log is... (2 Replies)
Discussion started by: thiyagoo
2 Replies
8. Shell Programming and Scripting
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
9. Shell Programming and Scripting
Hi,
Our log4j file contents look like this:
2018-11-20T00:06:58,888 INFO ql.Driver: Executing command(queryId=hive_20181120000656_49af4ad0-1d37-4312-872c-a247ed80c181): CREATE TABLE RESULTS.E7014485_ALL_HMS_CAP1
AS SELECT name,dept
from employee
Where employee='Jeff'... (4 Replies)
Discussion started by: wahi80
4 Replies
mountd(1M) mountd(1M)
NAME
mountd, rpc.mountd - server for NFS mount requests and NFS access checks
SYNOPSIS
n]
DESCRIPTION
is an RPC server that answers requests for NFS access information and file system mount requests. It reads the file to determine which
file systems are available for mounting by which remote machines. See sharetab(4). running on the local server will contact the first
time an NFS client tries to access the file system to determine whether the client should get read-write, read-only, or no access. This
access can be dependent on the security mode used in the remote procedure call from the client. See share_nfs(1M).
The command also provides information as to what file systems are mounted by which clients. This information can be printed using the
showmount(1M) command.
The daemon is automatically invoked if and in
Only superuser can run the daemon.
Options
The following options are supported:
This is an obsolete option. All messages and errors are logged to
Reject mount requests from clients. Clients that have file systems
mounted will not be affected.
Specify tracing level
n, where n can have one of the following values:
Errors only (default).
Errors, requests handled by mountd, results, and the names of the
main functions leading to the result
Run the command in verbose mode. Each time
determines what access a client should get, it will log the result to the as well as the names of the main functions
leading to the result.
WARNINGS
If is running, must also be running in order to be assured that the NFS server can respond to requests.
Some routines that compare hostnames use case-sensitive string comparisons; some do not. If an incoming request fails, verify that the
case of the hostname in the file to be parsed matches the case of the hostname called for, and attempt the request again.
If a client crashes, executing on the server will show that the client still has a file system mounted. In other words, stale entries may
accumulate in for clients that crash without sending an unmount request.
Also, if a client mounts the same remote directory twice, only one entry appears in Doing a of one of these directories removes the single
entry and no longer indicates that the remote directory is mounted.
AUTHOR
was developed by Sun Microsystems, Inc.
FILES
shared file system table
list of all hosts having file systems mounted from this machine
rpc.mountd log file for messages and errors
SEE ALSO
nfsd(1M), share(1M), share_nfs(1M), showmount(1M), sharetab(4).
mountd(1M)