Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
629b1e6b
Commit
629b1e6b
authored
Nov 23, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct errors in doc/development/logging.md
parent
0a42c7cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
doc/development/logging.md
doc/development/logging.md
+5
-5
No files found.
doc/development/logging.md
View file @
629b1e6b
...
...
@@ -75,7 +75,7 @@ To create a new file:
module Import
class Logger < ::Gitlab::JsonLogger
def self.file_name_noext
'importer
_json
'
'importer'
end
end
end
...
...
@@ -105,7 +105,7 @@ To create a new file:
```ruby
# GOOD
logger.info("Unable to create project", project_id: project.id)
logger.info(
message:
"Unable to create project", project_id: project.id)
```
1.
Be sure to create a common base structure of your log messages. For example,
...
...
@@ -118,13 +118,13 @@ To create a new file:
```ruby
# BAD
logger.info("Import error", error: 1)
logger.info("Import error", error: "I/O failure")
logger.info(
message:
"Import error", error: 1)
logger.info(
message:
"Import error", error: "I/O failure")
```
```ruby
# GOOD
logger.info("Import error", error_code: 1, error: "I/O failure")
logger.info(
message:
"Import error", error_code: 1, error: "I/O failure")
```
## Additional steps with new log files
...
...
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