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 log custom level for specific user(s) in production
BPM Lombardi logging
Silence Debug Logging in HTTPComponents
Mockito Mock log4j appender is not invoked while running unit test
Jooq does not find log4j2 Logger
How to use Spray's logRequestResponse in tests with debug level?
Logback file inclusion with a wildcard
Saving logs into a file by using Chainsaw
log4j2 PatternLayout Timestamp Format
Logger source file location - openbravoErp
Is Log4Net a message oriented middleware?
Using Syslog's unix socket with Log4J2
PropertyConfigurator in log4j2
Right-justify compound/composite expression in Log4j pattern layout?
What is equivalent to log4j 1 `log4j.appender.SYSLOG.Header=true` in log4j 2?
class mediator logs are not reflecting in Wso2 esb

Categories

HOME
pandas
sendgrid
testing
c#-4.0
razor
google-oauth
malloc
packages
ckeditor
retrofit
datastax-java-driver
elasticsearch-hadoop
session-variables
wheelnav.js
django-simple-history
dosgi
opentracing
saxon
pugjs
nhibernate-envers
introduction
swingx
tar
cultureinfo
pingfederate
buck
quote
lightswitch-2013
.net-4.0
catel
gtrendsr
winrt-xaml-toolkit
code-contracts
hybridauth
nssegmentedcontrol
bower-install
dosbox
jquery-bootgrid
qwerty
libvpx
android-tabhost
hp-ux
jvm-languages
eigenvalue
checkboxlist
dandelion
pebble-watch
gabor-filter
svmlight
aurelia-validation
magma
redundancy
url-pattern
color-picker
spring-android
ado.net-entity-data-model
home-directory
file-writing
lttng
ready-api
ipconfig
asp.net5
pyke
ford-fulkerson
wordml
drawbitmap
sankey-diagram
graph-api-explorer
fscommand
knuth
device-manager
fluentautomation
jubula
jquery-layout
undefined-reference
viadeo
fmod
spring-io
easy-install
html4
pushbackinputstream
sharp-repository
wsdl-2.0
kyotocabinet
referrer
angularjs-controller
frameset
armcc
jspinclude
django-tagging
netbeans-7.1
ecl
actionview
html-input
site.master
mozilla-prism
user-friendly
compiler-specific
virtual-functions
pascal-fc

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App