Logging Failing in Production

3
When starting the XAS in production mode on Windows running as a web service I get the following in my log INFO | jvm 1 | 2009/10/09 11:59:03 | 2009-10-09 11:59:03.923 ERROR - CORE: Unparseable syslog facility string: LOG_LOCAL6 INFO | jvm 1 | 2009/10/09 11:59:35 | Disabling logging to console... INFO | jvm 1 | 2009/10/09 11:59:35 | Detaching from console... INFO | jvm 1 | 2009/10/09 11:59:35 | Warning: detaching STDIN failed: The handle is invalid The only property related to logging in wrapper.conf that I changed from the example file in the wiki was 'wrapper.logfile'
asked
3 answers
3

On a Windows box you need to set the EnableLogBook setting to "true" and give it a LogBookLocation to write to. I believe in A and P modes the directory structure has to pre-exist but D and T modes will create it for you.

EnableSysLog is for Linux installations I believe.

answered
3

This isn't really a problem or a 'bug'. What's happing is that the service is trying to actually close the input part of the console so that you can't type any commands for the XAS. However, the System.in.close() call is nested in a try catch, which reports the error (detaching STDIN failed: The handle is invalid).

The XAS continues startup normally after it tries to close the console input, so you don't have to worry about anything.

You can also try to set the "EnableConsoleLog" in your config file to true

answered
0

EnableConsole Log is set to true, here are all my logging settings:

###############################################################
# Logging subsystem
#

# Logging to console
# Logging to console will be disabled after initializing when running the
# XAS using --detach
EnableConsoleLog = true
# Initial loglevel used for ConsoleLog (>= XAS 2.4)
# (CRITICAL,ERROR,WARN,INFO,DEBUG,TRACE); defaults to INFO
#ConsoleLogLevel = INFO

# Logging to file
# This file logging will be done by the XAS itself,  so therefore
# logfiles need to be in a location writable by the XAS server
# process. Logging via syslog is the preferred way in *nix
# environments.
# 
EnableLogbook = false
#LogbookLocation = /var/log/mendix/myproject.log
#LogbookMaxSize = 1024
#LogbookMaxArchive = 7
# Initial loglevel used for logging to file (>= XAS 2.4)
# (CRITICAL,ERROR,WARN,INFO,DEBUG,TRACE); defaults to INFO
#LogbookLevel = INFO

# Logging to a local or remote syslog host
# The logger only supports logging
# to syslog using UDP. Java does not support unix sockets!
#
EnableSyslog = true
# Hostname or IP Address to connect
SyslogHost = 127.0.0.1
# SyslogName will be prepended to log lines together with the
# thread-id, e.g. xas/mypr1, so we can filter out several
# xas instances of the same application and redirect logging
# using syslog configuration.
SyslogName = xas/VibePortal
# Logging facility to use
SyslogFacility = LOCAL6
# Initial loglevel used for Syslog (>= XAS 2.4)
# (CRITICAL,ERROR,WARN,INFO,DEBUG,TRACE); defaults to INFO
SyslogLevel = WARN
# Logging to Syslog ignores TRACE-level messages by default. Altering
# this behaviour it not recommended, but can be done by setting
# SyslogIgnoreTrace to false. In this case, TRACE-level messages will
# be written to syslog with level DEBUG. (>= XAS 2.4)
#SyslogIgnoreTrace = true
answered