diff --git a/src/s3fs.cpp b/src/s3fs.cpp index f193977..a6318c7 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -664,7 +664,7 @@ int get_local_fd(const char* path) { auto_curl_slist headers; string date = get_date(); - syslog(LOG_INFO, "LOCAL FD"); + if(debug) syslog(LOG_DEBUG, "LOCAL FD"); headers.append("Date: " + date); headers.append("Content-Type: "); if (public_bucket.substr(0,1) != "1") { @@ -743,7 +743,7 @@ static int put_headers(const char* path, headers_t meta) { //###rewind(f); - syslog(LOG_INFO, "copy path=%s", path); + if(debug) syslog(LOG_DEBUG, "copy path=%s", path); cout << "copying[path=" << path << "]" << endl; string my_url = prepare_url(url.c_str()); @@ -813,7 +813,7 @@ static int put_local_fd(const char* path, headers_t meta, int fd) { //###rewind(f); - syslog(LOG_INFO, "upload path=%s size=%llu", path, st.st_size); + if(debug) syslog(LOG_DEBUG, "upload path=%s size=%llu", path, st.st_size); cout << "uploading[path=" << path << "][fd=" << fd << "][size="<\n" @@ -2590,7 +2592,7 @@ int main(int argc, char *argv[]) { program_name.replace(0, found+1, ""); } - while ((ch = getopt_long(argc, argv, "dho:f", long_opts, &option_index)) != -1) { + while ((ch = getopt_long(argc, argv, "dho:fs", long_opts, &option_index)) != -1) { switch (ch) { case 0: if (strcmp(long_opts[option_index].name, "version") == 0) { @@ -2611,6 +2613,9 @@ int main(int argc, char *argv[]) { case 'f': break; + case 's': + break; + default: exit(1); }