Skip to content

Swiften and glib warnings go straight to terminal which launched the service #321

@andrey-utkin

Description

@andrey-utkin

Having started a service weeks ago from a tmux shell on my server, now I have that shell's scrollback full of such entries

(process:6411): Json-CRITICAL **: json_node_get_object: assertion 'JSON_NODE_IS_VALID (node)' failed
[warning] Swiften/Component/ComponentSessionStanzaChannel.cpp:50 send: Component: Trying to send a stanza while disconnected.

Setup:
Gentoo Linux, spectrum-2.0.9, swift-4.0.2.
I launch spectrum through OpenRC init script which invokes spectrum2_manager.
Logging configs:

decent /etc/spectrum2 # grep -F -A 5 '[logging]' transports/skype.cfg
[logging]
# log4cxx/log4j logging configuration file in ini format used for main spectrum2 instance.
config = /etc/spectrum2/logging.cfg

# log4cxx/log4j logging configuration file in ini format used for backends.
backend_config = /etc/spectrum2/backend-logging.cfg
decent /etc/spectrum2 # head -n999 logging.cfg backend-logging.cfg
==> logging.cfg <==
log4j.rootLogger=debug, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/var/log/spectrum2/${jid}/spectrum2.log

log4j.appender.R.MaxFileSize=10000KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p %c: %m%n

# Disable XML category
log4j.category.Component.XML = OFF

==> backend-logging.cfg <==
log4j.rootLogger=debug, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/var/log/spectrum2/${jid}/backends/backend-${id}.log

log4j.appender.R.MaxFileSize=10000KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=${pid}: %d %-5p %c: %m%n
decent /etc/spectrum2 #

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions