Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
nexedi
caddy
Commits
fdc62d01
Commit
fdc62d01
authored
8 years ago
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: Create log file directory before creating log file
parent
e8e55955
master
nxd-v0.11.0
nxd-v0.11.1
nxd-v0.11.5
nxd-v1.0.3
v1.0.0
v1.0.0-beta2
v1.0.0-beta1
v0.11.5
v0.11.4
v0.11.3
v0.11.2
v0.11.1
v0.11.1-4-g527de1864b6c33dac07c50694e07c50cb0abc3eb
v0.11.1-3-g5490ff205fed11f0972fde025934855d3a719d77
v0.11.0
v0.10.14
v0.10.13
v0.10.12
v0.10.11
v0.10.10
v0.10.9
v0.10.8
v0.10.7
v0.10.6
v0.10.5
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.5
v0.9.4
v0.9.3
v0.9.2
nxd-v1.0.3-1-g2c11cedc
nxd-v1.0.3-1-03fba31bf
nxd-v0.11.5-4-g9d3151db
nxd-v0.11.1-5-gdd393ce3a67e6a773be87185528a00f2e0a9eb26
nxd-v0.11.1-4-g527de1864b6c33dac07c50694e07c50cb0abc3eb
nxd-v0.11.1-3-g5490ff205fed11f0972fde025934855d3a719d77
nxd-v0.11.0-3-g12438f6cff8c15f307631151eb064cec579b7605
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
caddyhttp/log/setup.go
caddyhttp/log/setup.go
+6
-2
No files found.
caddyhttp/log/setup.go
View file @
fdc62d01
...
...
@@ -4,6 +4,7 @@ import (
"io"
"log"
"os"
"path/filepath"
"github.com/hashicorp/go-syslog"
"github.com/mholt/caddy"
...
...
@@ -33,8 +34,11 @@ func setup(c *caddy.Controller) error {
return
err
}
}
else
{
var
file
*
os
.
File
file
,
err
=
os
.
OpenFile
(
rules
[
i
]
.
OutputFile
,
os
.
O_RDWR
|
os
.
O_CREATE
|
os
.
O_APPEND
,
0644
)
err
:=
os
.
MkdirAll
(
filepath
.
Dir
(
rules
[
i
]
.
OutputFile
),
0744
)
if
err
!=
nil
{
return
err
}
file
,
err
:=
os
.
OpenFile
(
rules
[
i
]
.
OutputFile
,
os
.
O_RDWR
|
os
.
O_CREATE
|
os
.
O_APPEND
,
0644
)
if
err
!=
nil
{
return
err
}
...
...
This diff is collapsed.
Click to expand it.
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