Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
log
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libs
log
Commits
ed7a8f33
Commit
ed7a8f33
authored
6 years ago
by
admin-sigmundd
Browse files
Options
Downloads
Patches
Plain Diff
Graylog Support into a new Branch
parent
460f344e
No related branches found
No related tags found
1 merge request
!1
Update index.test.js, examples/all-options.js, examples/log-to-file.js,...
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-7
1 addition, 7 deletions
README.md
index.js
+0
-32
0 additions, 32 deletions
index.js
package.json
+0
-1
0 additions, 1 deletion
package.json
with
1 addition
and
40 deletions
README.md
+
1
−
7
View file @
ed7a8f33
...
...
@@ -29,12 +29,6 @@ Note: The options Part may be omitted, as all parts are optional, but using the
{
name:
'Name
of
App.
Default:
Name
of
BaseFolder'
,
hostname:
'Server
Hostname
,
Default:
os.hostname()'
,
file:
'File
to
Append
Log
to'
,
graylog:
[
{
server:
'graylog-server'
,
port:
'graylog-port'
}
]
file:
'File
to
Append
Log
to'
}
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.js
+
0
−
32
View file @
ed7a8f33
...
...
@@ -14,14 +14,6 @@ function Log (options) {
if
(
this
.
options
.
file
)
{
this
.
fs
=
require
(
'
fs
'
)
}
if
(
this
.
options
.
graylog
)
{
this
.
graylog2
=
require
(
'
graylog2
'
)
this
.
graylogger
=
new
this
.
graylog2
.
graylog
({
// eslint-disable-line new-cap
servers
:
this
.
options
.
graylog
,
hostname
:
this
.
hostname
,
facility
:
this
.
name
})
}
this
.
info
=
function
(
message
)
{
this
.
log
(
'
INFO
'
,
message
)
}
...
...
@@ -71,30 +63,6 @@ function Log (options) {
}
})
}
if
(
this
.
options
.
graylog
)
{
switch
(
tag
)
{
case
'
INFO
'
:
this
.
graylogger
.
info
(
message
)
break
case
'
NOTICE
'
:
this
.
graylogger
.
notice
(
message
)
break
case
'
WARN
'
:
this
.
graylogger
.
warning
(
message
)
break
case
'
ERROR
'
:
this
.
graylogger
.
error
(
message
)
break
case
'
FATAL
'
:
this
.
graylogger
.
critical
(
message
)
break
case
'
DEBUG
'
:
this
.
graylogger
.
debug
(
message
)
break
default
:
this
.
graylogger
.
notice
(
message
)
}
}
}
this
.
getDate
=
function
()
{
var
tzoffset
=
(
new
Date
()).
getTimezoneOffset
()
*
60000
// offset in milliseconds
...
...
This diff is collapsed.
Click to expand it.
package.json
+
0
−
1
View file @
ed7a8f33
...
...
@@ -9,6 +9,5 @@
"author"
:
"Dominik Sigmund"
,
"license"
:
"
ISC
"
,
"dependencies"
:
{
"
graylog2
"
:
"
^0.2.1
"
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment