Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syslog hook in skywire apps and fix syslog in some visor modules #983

Closed
ersonp opened this issue Oct 29, 2021 · 0 comments
Closed

Add syslog hook in skywire apps and fix syslog in some visor modules #983

ersonp opened this issue Oct 29, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@ersonp
Copy link
Contributor

ersonp commented Oct 29, 2021

Describe the bug
The logs of the skywire apps are not saved to syslog so we need to add a hook.
Some of the visor module logs namely dmsgC, stcpr, dmsg_pty, stcp and maybe others are not being saved in syslog

Environment information:

  • OS: e.g. Linux
  • Platform: Linux 5.11.0-38-generic x86_64

Steps to Reproduce
Steps to reproduce the behavior:

  1. Install and start syslog-ng sudo syslog-ng -f ./syslog-ng.conf -edv with this config
# Default syslog-ng.conf file which collects all local logs into a
# single file called /var/log/skywire tailored to container usage.


@version: 3.29
@include "scl.conf"

source s_local {
	internal();
};

source s_network {
	default-network-drivers(
		# NOTE: TLS support
		#
		# the default-network-drivers() source driver opens the TLS
		# enabled ports as well, however without an actual key/cert
		# pair they will not operate and syslog-ng would display a
		# warning at startup.
		#
		#tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
	);
};

destination d_local {
	file("/var/log/skywire");
	file("/var/log/skywire-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3));
};

log {
	source(s_local);
	source(s_network);
	destination(d_local);
};
  1. Run ./skywire-visor skywire-config.json --syslog localhost:514
  2. Check terminal
  3. Check syslogs at sudo cat /var/log/skywire
@ersonp ersonp added the bug Something isn't working label Oct 29, 2021
This was referenced Nov 24, 2021
@jdknives jdknives closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants