Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
coreospackage
Commits
9680f92f
Commit
9680f92f
authored
7 years ago
by
Sandeep S. Shewalkar
Browse files
Options
Downloads
Patches
Plain Diff
method name modifications
parent
98e39881
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loggingHelper.go
+17
-19
loggingHelper.go
with
17 additions
and
19 deletions
loggingHelper.go
+
17
−
19
View file @
9680f92f
...
...
@@ -11,38 +11,36 @@ var logger = logrus.New()
func
init
()
{
//log.Formatter = new(logger.JSONFormatter)
logger
.
Formatter
=
new
(
logrus
.
TextFormatter
)
// default
logger
.
Level
=
logrus
.
ErrorLevel
file
,
err
:=
os
.
OpenFile
(
"GolangFullStack.log"
,
os
.
O_CREATE
|
os
.
O_APPEND
,
0666
)
logger
.
Level
=
logrus
.
InfoLevel
file
,
err
:=
os
.
OpenFile
(
"serverlogs.log"
,
os
.
O_CREATE
|
os
.
O_APPEND
,
0666
)
if
err
==
nil
{
logger
.
Out
=
file
}
else
{
logger
.
Info
(
"Failed to log to file, using default stderr"
)
}
}
//Debug Debug
func
Debug
(
message
string
)
{
logger
.
Debug
(
message
)
//
Log
Debug
Log
Debug
messages
func
Log
Debug
(
args
...
interface
{}
)
{
logger
.
Debug
(
args
)
}
//Info
Info
func
Info
(
message
string
)
{
logger
.
Info
(
message
)
//
Log
Info
Logs Info messages
func
Log
Info
(
args
...
interface
{}
)
{
logger
.
Info
(
args
)
}
//Warn
Warn
func
Warn
(
message
string
)
{
logger
.
Warn
(
message
)
//
Log
Warn
Logs Warning messages
func
Log
Warn
(
args
...
interface
{}
)
{
logger
.
Warn
(
args
)
}
//Error
Error
func
Error
(
message
string
)
{
logger
.
Error
(
message
)
//
Log
Error
Logs Error messages
func
Log
Error
(
args
...
interface
{}
)
{
logger
.
Error
(
args
)
}
//Panic
Panic
func
Panic
(
message
string
)
{
logger
.
Panic
(
message
)
//
Log
Panic
Logs Panic messages
func
Log
Panic
(
args
...
interface
{}
)
{
logger
.
Panic
(
args
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets