Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
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
Kirill Smelkov
jacobsa-fuse
Commits
41f376af
Commit
41f376af
authored
May 25, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added commonOp.errorLogger.
parent
e0db5cf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
fuseops/common_op.go
fuseops/common_op.go
+11
-0
mounted_file_system.go
mounted_file_system.go
+2
-1
No files found.
fuseops/common_op.go
View file @
41f376af
...
...
@@ -16,6 +16,7 @@ package fuseops
import
(
"fmt"
"log"
"reflect"
"strings"
...
...
@@ -50,6 +51,9 @@ type commonOp struct {
// first argument is a call depth.
debugLog
func
(
int
,
string
,
...
interface
{})
// A logger to be used for logging exceptional errors.
errorLogger
*
log
.
Logger
// A function that is invoked with the error given to Respond, for use in
// closing off traces and reporting back to the connection.
finished
func
(
error
)
...
...
@@ -77,12 +81,14 @@ func (o *commonOp) init(
op
internalOp
,
bazilReq
bazilfuse
.
Request
,
debugLog
func
(
int
,
string
,
...
interface
{}),
errorLogger
*
log
.
Logger
,
finished
func
(
error
))
{
// Initialize basic fields.
o
.
ctx
=
ctx
o
.
op
=
op
o
.
bazilReq
=
bazilReq
o
.
debugLog
=
debugLog
o
.
errorLogger
=
errorLogger
o
.
finished
=
finished
// Set up a trace span for this op.
...
...
@@ -130,6 +136,11 @@ func (o *commonOp) Respond(err error) {
o
.
op
.
ShortDesc
(),
err
)
o
.
errorLogger
.
Printf
(
"(%s) error: %v"
,
o
.
op
.
ShortDesc
(),
err
)
// Send a response to the kernel.
o
.
bazilReq
.
RespondError
(
err
)
}
...
...
mounted_file_system.go
View file @
41f376af
...
...
@@ -77,7 +77,8 @@ type MountConfig struct {
ReadOnly
bool
// A logger to use for logging errors. All errors are logged, with the
// exception of a few blacklisted errors that are expected.
// exception of a few blacklisted errors that are expected. If nil, no error
// logging is performed.
ErrorLogger
*
log
.
Logger
// OS X only.
...
...
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