refactor: remove logging modules

pull/5698/head
NGPixel 2 years ago
parent edb529378e
commit 70a2e3ca63
No known key found for this signature in database
GPG Key ID: 8FDA2F1757F60D63

@ -1,8 +0,0 @@
key: airbrake
title: Airbrake
description: Airbrake is the leading exception reporting service, currently providing error monitoring for 50,000 applications with support for 18 programming languages.
author: requarks.io
logo: https://static.requarks.io/logo/airbrake.svg
website: https://airbrake.io/
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Airbrake
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,12 +0,0 @@
key: bugsnag
title: Bugsnag
description: Bugsnag monitors apps for errors that impact customers & reports all diagnostic data.
author: requarks.io
logo: https://static.requarks.io/logo/bugsnag.svg
website: https://www.bugsnag.com/
defaultLevel: warn
props:
key:
type: String
title: Key
hint: Bugsnag Project Notifier key

@ -1,29 +0,0 @@
const util = require('util')
const winston = require('winston')
const _ = require('lodash')
// ------------------------------------
// Bugsnag
// ------------------------------------
module.exports = {
init (logger, conf) {
let BugsnagLogger = winston.transports.BugsnagLogger = function (options) {
this.name = 'bugsnagLogger'
this.level = options.level || 'warn'
this.bugsnag = require('bugsnag')
this.bugsnag.register(options.key)
}
util.inherits(BugsnagLogger, winston.Transport)
BugsnagLogger.prototype.log = function (level, msg, meta, callback) {
this.bugsnag.notify(new Error(msg), _.assignIn(meta, { severity: level }))
callback(null, true)
}
logger.add(new BugsnagLogger({
level: 'warn',
key: conf.key
}))
}
}

@ -1,8 +0,0 @@
key: disk
title: Log Files
description: Outputs log files on local disk.
author: requarks.io
logo: https://static.requarks.io/logo/local-fs.svg
website: https://wiki.js.org
defaultLevel: info
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Disk
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,8 +0,0 @@
key: eventlog
title: Windows Event Log
description: Report logs to the Windows Event Log
author: requarks.io
logo: https://static.requarks.io/logo/windows-server.svg
website: https://wiki.js.org
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Windows Event Log
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,16 +0,0 @@
key: loggly
title: Loggly
description: Log Analysis / Log Management by Loggly, the world's most popular log analysis & monitoring in the cloud.
author: requarks.io
logo: https://static.requarks.io/logo/loggly.svg
website: https://www.loggly.com/
defaultLevel: warn
props:
token:
type: String
title: Token
hint: Loggly Token
subdomain:
type: String
title: Subdomain
hint: Loggly Subdomain

@ -1,18 +0,0 @@
const winston = require('winston')
// ------------------------------------
// Loggly
// ------------------------------------
module.exports = {
init (logger, conf) {
require('winston-loggly-bulk')
logger.add(new winston.transports.Loggly({
token: conf.token,
subdomain: conf.subdomain,
tags: ['wiki-js'],
level: 'warn',
json: true
}))
}
}

@ -1,8 +0,0 @@
key: logstash
title: Logstash
description: Logstash is an open source tool for collecting, parsing, and storing logs for future use.
author: requarks.io
logo: https://static.requarks.io/logo/logstash.svg
website: https://www.elastic.co/products/logstash
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Logstash
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,8 +0,0 @@
key: newrelic
title: New Relic
description: New Relic's digital intelligence platform lets developers, ops, and tech teams measure and monitor the performance of their applications and infrastructure.
author: requarks.io
logo: https://static.requarks.io/logo/newrelic.svg
website: https://newrelic.com/
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// New Relic
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,14 +0,0 @@
key: papertrail
title: Papertrail
description: Frustration-free log management.
author: requarks.io
logo: https://static.requarks.io/logo/papertrail.svg
website: https://papertrailapp.com/
defaultLevel: warn
props:
host:
type: String
title: Host
port:
type: Number
title: Port

@ -1,18 +0,0 @@
const winston = require('winston')
// ------------------------------------
// Papertrail
// ------------------------------------
module.exports = {
init (logger, conf) {
// eslint-disable-next-line no-unused-expressions
require('winston-papertrail').Papertrail // NOSONAR
logger.add(new winston.transports.Papertrail({
host: conf.host,
port: conf.port,
level: 'warn',
program: 'wiki.js'
}))
}
}

@ -1,8 +0,0 @@
key: raygun
title: Raygun
description: Error, crash and performance monitoring for software teams.
author: requarks.io
logo: https://static.requarks.io/logo/raygun.svg
website: https://raygun.com/
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Raygun
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -1,11 +0,0 @@
key: rollbar
title: Rollbar
description: Rollbar provides real-time error alerting & debugging tools for developers.
author: requarks.io
logo: https://static.requarks.io/logo/rollbar.svg
website: https://rollbar.com/
defaultLevel: warn
props:
key:
type: String
title: Key

@ -1,29 +0,0 @@
const util = require('util')
const winston = require('winston')
const _ = require('lodash')
// ------------------------------------
// Rollbar
// ------------------------------------
module.exports = {
init (logger, conf) {
let RollbarLogger = winston.transports.RollbarLogger = function (options) {
this.name = 'rollbarLogger'
this.level = options.level || 'warn'
this.rollbar = require('rollbar')
this.rollbar.init(options.key)
}
util.inherits(RollbarLogger, winston.Transport)
RollbarLogger.prototype.log = function (level, msg, meta, callback) {
this.rollbar.handleErrorWithPayloadData(new Error(msg), _.assignIn(meta, { level }))
callback(null, true)
}
logger.add(new RollbarLogger({
level: 'warn',
key: conf.key
}))
}
}

@ -1,11 +0,0 @@
key: sentry
title: Sentry
description: Open-source error tracking that helps developers monitor and fix crashes in real time.
author: requarks.io
logo: https://static.requarks.io/logo/sentry.svg
website: https://sentry.io/
defaultLevel: warn
props:
key:
type: String
title: Key

@ -1,29 +0,0 @@
const util = require('util')
const winston = require('winston')
// ------------------------------------
// Sentry
// ------------------------------------
module.exports = {
init (logger, conf) {
let SentryLogger = winston.transports.SentryLogger = function (options) {
this.name = 'sentryLogger'
this.level = options.level || 'warn'
this.raven = require('raven')
this.raven.config(options.key).install()
}
util.inherits(SentryLogger, winston.Transport)
SentryLogger.prototype.log = function (level, msg, meta, callback) {
level = (level === 'warn') ? 'warning' : level
this.raven.captureMessage(msg, { level, extra: meta })
callback(null, true)
}
logger.add(new SentryLogger({
level: 'warn',
key: conf.key
}))
}
}

@ -1,8 +0,0 @@
key: syslog
title: Syslog
description: Syslog is a way for network devices to send event messages to a logging server.
author: requarks.io
logo: https://static.requarks.io/logo/syslog.svg
website: https://wiki.js.org
defaultLevel: warn
props: {}

@ -1,9 +0,0 @@
// ------------------------------------
// Syslog
// ------------------------------------
module.exports = {
init (logger, conf) {
}
}

@ -29,7 +29,7 @@ const routes = [
children: [
{ path: '', redirect: '/_admin/dashboard' },
{ path: 'dashboard', component: () => import('../pages/AdminDashboard.vue') },
// { path: 'sites', component: () => import('../pages/AdminSites.vue') },
{ path: 'sites', component: () => import('../pages/AdminSites.vue') },
// // -> Site
// { path: ':siteid/general', component: () => import('../pages/AdminGeneral.vue') },
{ path: ':siteid/editors', component: () => import('../pages/AdminEditors.vue') },

@ -38,6 +38,9 @@ export const useAdminStore = defineStore('admin', {
fetchPolicy: 'network-only'
})
this.sites = cloneDeep(resp?.data?.sites ?? [])
if (!this.currentSiteId) {
this.currentSiteId = this.sites[0].id
}
}
}
})

Loading…
Cancel
Save