summaryrefslogtreecommitdiff
path: root/libfusepp/fuseAppBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'libfusepp/fuseAppBase.h')
-rw-r--r--libfusepp/fuseAppBase.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libfusepp/fuseAppBase.h b/libfusepp/fuseAppBase.h
index 1a4a0bc..a9be11b 100644
--- a/libfusepp/fuseAppBase.h
+++ b/libfusepp/fuseAppBase.h
@@ -7,6 +7,8 @@
#include <exception>
#include <stdio.h>
#include <errno.h>
+#include <syslog.h>
+#include <misc.h>
#ifndef DLL_PUBLIC
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
#endif
@@ -58,6 +60,7 @@ class DLL_PUBLIC FuseAppBase {
virtual int flock(const char *, struct fuse_file_info *, int op);
virtual int fallocate(const char *, int, off_t, off_t, struct fuse_file_info *);
virtual int onError(const std::exception & err) throw();
+ virtual void log(int level, const std::string &) const throw() = 0;
virtual int fuse_opt_parse(struct fuse_args *args, void *data, const struct fuse_opt opts[], fuse_opt_proc_t proc) = 0;
virtual int main(int, char **, const struct fuse_operations *) = 0;
@@ -156,7 +159,7 @@ class DLL_PUBLIC FuseAppBase {
return helper<f>(a...);
}
catch (...) {
- fprintf(stderr, "Unknown exception calling %s\n", typeid(f).name());
+ fuseApp->log(LOG_ERR, stringf("Unknown exception calling %s\n", typeid(f).name()));
return -ENOSYS;
}
}