log4j


log4j.xml produce java.io.FileNotFoundException, but log4j.properties create the file


when I use this stdout xml appender in log4j.xml:
<appender name="stdout" class="org.apache.log4j.RollingFileAppender">
<param name="threshold" value="TRACE"/>
<param name="File" value="stdout"/>
<param name="maxFileSize" value="50MB"/>
<param name="maxBackupIndex" value="100"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="levelMin" value="ALL" />
<param name="levelMax" value="OFF" />
</filter>
</appender>
I get this error: java.io.FileNotFoundException: stdout (Permission denied)
but if I use the log4j.properties version (std file is created).
log4j.appender.stdout=org.apache.log4j.RollingFileAppender
log4j.appender.stdout.threshold=TRACE
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.filter.filter1=org.apache.log4j.varia.LevelRangeFilter
log4j.appender.stdout.filter.filter1.levelMin=ALL
log4j.appender.stdout.filter.filter1.levelMax=OFF
log4j.appender.stdout.maxFileSize=50MB
log4j.appender.stdout.maxBackupIndex=100
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.appender.stdout.File=stdout
can you help how to fix it?
Thanks.

Related Links

Log4j is implementation of commons-logging or slf4j?
How to deal with dependencies using log4j 1.x, when project uses log4j2
Cassandra not picking up log4j-server.properties file
Overriding a log4j.properties file
log4j and Weblogic Server : Logs not getting generated
Log4j write to yesterday file? How to fix?
Filter log by matching pattern - log4j
LogMF showing error when migrated to Log4j2
Defining log4j logger when name contains spaces
logging in Mule to a non-root logger
Why log4J not working after adding apache CXF?
Websphere 8.5 Log4J not working with Parent First
Log4j RollingFileAppender overwrites the old files
Log4j not working
where to put log4j.properties in java gradle web application on eclipse
Achieving a specific format in Apache Log4j

Categories

HOME
ms-access
log4j
oracle11g
tinymce
nullpointerexception
homebrew
mean-stack
xmpp
q
kalman-filter
jsrender
win32gui
blueprintjs
mvvmcross
podio
add
medical
tomcat6
fortumo
circuit
decimal
footer
ab-testing
firefox-webextensions
custom-wordpress-pages
zapier
sylius
realex-payments-api
wijmo
autosys
icloud-api
vlsi
fish
uninstall
fopen
fluentvalidation
jspm
gitignore
file-rename
nat
react-chartjs
http-get
calibre
framemaker
xmlreader
cloud-code
mpmediaquery
bytecode-manipulation
suricata
simplexml
x11-forwarding
hot-module-replacement
hilbert-curve
xenforo
bootstrapper
texmaker
komodoedit
aurelia-validation
recursive-datastructures
query-performance
mediaelement
heidisql
home-directory
url-masking
dstu2-fhir
file-writing
simplewebrtc
sigabrt
php-internals
asp.net5
pyke
cloudbees
netmq
freelancer.com-api
msys
lib.web.mvc
retina
angular-leaflet-directive
interrupted-exception
operation
clipperlib
skos
jsapi
xc16
tt-news
gui-test-framework
fpml
html-helper
elliptic-curve
seaside
fmod
page-layout
dir
web2py-modules
file-locking
excel-2003
back-stack
flashvars
clipper
trusted
pysimplesoap
newtonscript
ocx
nsmanagedobject
jquery-ui-layout
deobfuscation
blackberry-playbook
calling-convention
datareader
remember-me
wise
bespin
port-number
windows-live-messenger
lzh
ntvdm.exe

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App