Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dgraph
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Mirror
dgraph
Commits
443bba79
Unverified
Commit
443bba79
authored
8 years ago
by
Pawan Rawal
Browse files
Options
Downloads
Patches
Plain Diff
Adding check for existence of mutations directory in commit/log.go.
parent
8ff55e73
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
commit/log.go
+6
-0
6 additions, 0 deletions
commit/log.go
with
6 additions
and
0 deletions
commit/log.go
+
6
−
0
View file @
443bba79
...
...
@@ -282,6 +282,12 @@ func (l *Logger) Init() {
glog
.
Debug
(
"Logger init started."
)
{
// Checking if the directory exists.
if
_
,
err
:=
os
.
Stat
(
l
.
dir
);
err
!=
nil
{
if
os
.
IsNotExist
(
err
)
{
glog
.
WithError
(
err
)
.
Fatal
(
"Unable to find dir."
)
}
}
// First check if we have a current file.
path
:=
filepath
.
Join
(
l
.
dir
,
fmt
.
Sprintf
(
"%s-current.log"
,
l
.
filePrefix
))
fi
,
err
:=
os
.
Stat
(
path
)
...
...
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