View papertrail-logspout-daemonset.yml
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: logspout-papertrail | |
spec: | |
template: | |
metadata: | |
labels: | |
name: logspout-papertrail | |
spec: |
View deploy_hooks.yml
production: | |
after_symlink: | |
- source: /.cloud66/log_files.yml | |
destination: /etc/log_files.yml | |
sudo: true | |
target: any | |
apply_during: all | |
- source: /.cloud66/remote_syslog.init.d | |
destination: /etc/init.d/remote_syslog |
View server.js
var sleep = require('system-sleep'); | |
var winston = require('winston'); | |
require('winston-papertrail').Papertrail | |
const winstonConsole = new winston.transports.Console() | |
const winstonPapertrail = new winston.transports.Papertrail({ | |
host: 'logsN.papertrailapp.com', | |
port: xxxxx, | |
flushOnClose: true, | |
}) |
View oneline_detailed_logging.rb
# Outputs this at warn log level: | |
# 1.2.3.4 GET /path 200 OK BlahController#action HTML 938.2 (DB 11.8, View 719.7) {params} {optional params from flash[:log]} | |
# | |
# Save as config/initializers/oneline_detailed_logging.rb. Consider | |
# decreasing the log level from "info" to "warn" (in production.rb) so | |
# the one-line log message replaces the standard request logs. | |
# override process_action to add 2 things to the payload: | |
# - remote IP |