Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
182e079d
Commit
182e079d
authored
Oct 06, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into cloudwatch
parents
3d520957
318af9b4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
.gitignore
+1
-0
conf/defaults.ini
+2
-0
docs/mkdocs.yml
+4
-4
pkg/log/console.go
+3
-1
pkg/setting/setting.go
+6
-2
public/app/plugins/datasource/elasticsearch/query_def.js
+1
-1
No files found.
.gitignore
View file @
182e079d
...
...
@@ -31,3 +31,4 @@ conf/custom.ini
fig.yml
profile.cov
grafana
.notouch
conf/defaults.ini
View file @
182e079d
...
...
@@ -224,6 +224,8 @@ level = Info
# For "console" mode only
[log.console]
level
=
# Set formatting to "false" to disable color formatting of console logs
formatting
=
true
# For "file" mode only
[log.file]
...
...
docs/mkdocs.yml
View file @
182e079d
...
...
@@ -25,13 +25,16 @@ google_analytics: ['UA-47280256-1', 'grafana.org']
pages
:
# Introduction:
-
[
'
index.md'
,
'
About'
,
'
Grafana'
]
-
[
'
index.md'
,
'
Project'
,
'
About
Grafana'
]
-
[
'
project/cla.md'
,
'
Project'
,
'
Contributor
License
Agreement'
]
-
[
'
installation/index.md'
,
'
Installation'
,
'
Installation'
]
-
[
'
installation/debian.md'
,
'
Installation'
,
'
Installing
on
Debian
/
Ubuntu'
]
-
[
'
installation/rpm.md'
,
'
Installation'
,
'
Installing
on
RPM-based
Linux'
]
-
[
'
installation/mac.md'
,
'
Installation'
,
'
Installing
on
Mac
OS
X'
]
-
[
'
installation/windows.md'
,
'
Installation'
,
'
Installing
on
Windows'
]
-
[
'
installation/docker.md'
,
'
Installation'
,
'
Installing
on
Docker'
]
-
[
'
project/building_from_source.md'
,
'
Installation'
,
'
Building
from
Source'
]
-
[
'
installation/configuration.md'
,
'
Installation'
,
'
Configuration'
]
-
[
'
installation/ldap.md'
,
'
Installation'
,
'
LDAP
Integration'
]
...
...
@@ -70,7 +73,4 @@ pages:
-
[
'
tutorials/index.md'
,
'
Tutorials'
,
'
Tutorials'
]
-
[
'
tutorials/hubot_howto.md'
,
'
Tutorials'
,
'
How
To
integrate
Hubot
and
Grafana'
]
-
[
'
project/building_from_source.md'
,
'
Project'
,
'
Building
from
Source'
]
-
[
'
project/cla.md'
,
'
Project'
,
'
Contributor
License
Agreement'
]
-
[
'
jsearch.md'
,
'
**HIDDEN**'
]
pkg/log/console.go
View file @
182e079d
...
...
@@ -47,6 +47,7 @@ var (
type
ConsoleWriter
struct
{
lg
*
log
.
Logger
Level
int
`json:"level"`
Formatting
bool
`json:"formatting"`
}
// create ConsoleWriter returning as LoggerInterface.
...
...
@@ -54,6 +55,7 @@ func NewConsole() LoggerInterface {
return
&
ConsoleWriter
{
lg
:
log
.
New
(
os
.
Stderr
,
""
,
log
.
Ldate
|
log
.
Ltime
),
Level
:
TRACE
,
Formatting
:
true
,
}
}
...
...
@@ -65,7 +67,7 @@ func (cw *ConsoleWriter) WriteMsg(msg string, skip, level int) error {
if
cw
.
Level
>
level
{
return
nil
}
if
runtime
.
GOOS
==
"windows"
{
if
runtime
.
GOOS
==
"windows"
||
!
cw
.
Formatting
{
cw
.
lg
.
Println
(
msg
)
}
else
{
cw
.
lg
.
Println
(
colors
[
level
](
msg
))
...
...
pkg/setting/setting.go
View file @
182e079d
...
...
@@ -140,7 +140,7 @@ type CommandLineArgs struct {
func
init
()
{
IsWindows
=
runtime
.
GOOS
==
"windows"
log
.
NewLogger
(
0
,
"console"
,
`{"level": 0}`
)
log
.
NewLogger
(
0
,
"console"
,
`{"level": 0
, "formatting":true
}`
)
}
func
parseAppUrlAndSubUrl
(
section
*
ini
.
Section
)
(
string
,
string
)
{
...
...
@@ -527,7 +527,11 @@ func initLogging(args *CommandLineArgs) {
// Generate log configuration.
switch
mode
{
case
"console"
:
LogConfigs
[
i
]
=
util
.
DynMap
{
"level"
:
level
}
formatting
:=
sec
.
Key
(
"formatting"
)
.
MustBool
(
true
)
LogConfigs
[
i
]
=
util
.
DynMap
{
"level"
:
level
,
"formatting"
:
formatting
,
}
case
"file"
:
logPath
:=
sec
.
Key
(
"file_name"
)
.
MustString
(
filepath
.
Join
(
LogsPath
,
"grafana.log"
))
os
.
MkdirAll
(
filepath
.
Dir
(
logPath
),
os
.
ModePerm
)
...
...
public/app/plugins/datasource/elasticsearch/query_def.js
View file @
182e079d
...
...
@@ -36,7 +36,7 @@ function (_) {
{
text
:
"No limit"
,
value
:
'0'
},
{
text
:
"1"
,
value
:
'1'
},
{
text
:
"2"
,
value
:
'2'
},
{
text
:
"3"
,
value
:
'
4
'
},
{
text
:
"3"
,
value
:
'
3
'
},
{
text
:
"5"
,
value
:
'5'
},
{
text
:
"10"
,
value
:
'10'
},
{
text
:
"15"
,
value
:
'15'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment