]> arthur.barton.de Git - netatalk.git/commitdiff
afpd set the logger default to log_info and move some log msgs to log_debug
authordidg <didg>
Thu, 21 Jan 2010 14:14:49 +0000 (14:14 +0000)
committerdidg <didg>
Thu, 21 Jan 2010 14:14:49 +0000 (14:14 +0000)
config/afpd.conf.tmpl
etc/afpd/desktop.c
etc/afpd/filedir.c
etc/afpd/quota.c
libatalk/adouble/ad_sendfile.c
libatalk/cnid/dbd/cnid_dbd.c
libatalk/util/logger.c
libatalk/util/server_child.c
libatalk/util/server_ipc.c

index 77e6aef65390f0776098bc5be2a848c1e6696728..c2830c1450f2a96762881fb56b8b75c346fbca40 100644 (file)
 #
 #                         By default (no explicit -setuplog and no buildtime configure flag
 #                         --with-logfile) afpd logs to syslog with a default
-#                         logging setup equivalent to "-setuplog default log_note".
+#                         logging setup equivalent to "-setuplog default log_info".
 #               
 #                         If build with --with-logfile[=somefile] (default logfile
 #                         /var/log/netatalk.log) afpd defaults to a setup that is equivalent
-#                         to "-setuplog default log_note [netatalk.log|somefile]"
+#                         to "-setuplog default log_info [netatalk.log|somefile]"
 #
 #                         logtypes:  Default, AFPDaemon, Logger, UAMSDaemon
 #                         loglevels: LOG_SEVERE, LOG_ERROR, LOG_WARN, LOG_NOTE, LOG_INFO, LOG_DEBUG,
index fc2e306be3a83e5d235b684ad064923525ff41e1..4802b20e3ec5f67312805985806b8f1c5a2a57e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.c,v 1.48 2010-01-05 12:06:33 franklahm Exp $
+ * $Id: desktop.c,v 1.49 2010-01-21 14:14:49 didg Exp $
  *
  * See COPYRIGHT.
  *
@@ -536,7 +536,7 @@ int afp_geticon(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
         return AFP_OK;
 
 geticon_exit:
-        LOG(log_info, logtype_afpd, "afp_geticon(%s): %s", icon_dtfile(vol, fcreator), strerror(errno));
+        LOG(log_error, logtype_afpd, "afp_geticon(%s): %s", icon_dtfile(vol, fcreator), strerror(errno));
         dsi_readdone(dsi);
         obj->exit(EXITERR_SYS);
         return AFP_OK;
index b88a8645fa32c957bebf32e2867720397954b3f5..897bb5768c4cf99222ca59449ee9be2425e79454 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.68 2010-01-19 14:51:18 franklahm Exp $
+ * $Id: filedir.c,v 1.69 2010-01-21 14:14:49 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -301,7 +301,7 @@ int check_name(const struct vol *vol, char *name)
         return AFPERR_PARAM;
 
     if (!vol->vfs->vfs_validupath(vol, name)) {
-        LOG(log_info, logtype_afpd, "check_name: illegal name: '%s'", name);
+        LOG(log_error, logtype_afpd, "check_name: illegal name: '%s'", name);
         return AFPERR_EXIST;
     }
 
@@ -734,7 +734,7 @@ int veto_file(const char*veto_str, const char*path)
     for(i=0, j=0; veto_str[i] != '\0'; i++) {
         if (veto_str[i] == '/') {
             if ((j>0) && (path[j] == '\0')) {
-                LOG(log_info, logtype_afpd, "vetoed file:'%s'", path);
+                LOG(log_debug, logtype_afpd, "vetoed file:'%s'", path);
                 return 1;
             }
             j = 0;
index 2a12ca5e73e9932a6167e78cd3257f2a99616f06..e40de5fab87fb5f16cc1d6a3d02cafa8a7d1774e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: quota.c,v 1.32 2009-10-14 02:24:05 didg Exp $
+ * $Id: quota.c,v 1.33 2010-01-21 14:14:49 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -695,19 +695,19 @@ int uquota_getvolspace( struct vol *vol, VolSpace *bfree, VolSpace *btotal, cons
 #endif
 
 #ifdef DEBUG_QUOTA
-        LOG(log_info, logtype_afpd, "after calling getquota in uquota_getvolspace!" );
-        LOG(log_info, logtype_afpd, "dqb_ihardlimit: %u", dqblk.dqb_ihardlimit );
-        LOG(log_info, logtype_afpd, "dqb_isoftlimit: %u", dqblk.dqb_isoftlimit );
-        LOG(log_info, logtype_afpd, "dqb_curinodes : %u", dqblk.dqb_curinodes );
-        LOG(log_info, logtype_afpd, "dqb_bhardlimit: %u", dqblk.dqb_bhardlimit );
-        LOG(log_info, logtype_afpd, "dqb_bsoftlimit: %u", dqblk.dqb_bsoftlimit );
-        LOG(log_info, logtype_afpd, "dqb_curblocks : %u", dqblk.dqb_curblocks );
-        LOG(log_info, logtype_afpd, "dqb_btime     : %u", dqblk.dqb_btime );
-        LOG(log_info, logtype_afpd, "dqb_itime     : %u", dqblk.dqb_itime );
-        LOG(log_info, logtype_afpd, "bsize/this_bsize : %u/%u", bsize, this_bsize );
-       LOG(log_info, logtype_afpd, "dqblk.dqb_bhardlimit size: %u", tobytes( dqblk.dqb_bhardlimit, this_bsize ));
-       LOG(log_info, logtype_afpd, "dqblk.dqb_bsoftlimit size: %u", tobytes( dqblk.dqb_bsoftlimit, this_bsize ));
-       LOG(log_info, logtype_afpd, "dqblk.dqb_curblocks  size: %u", tobytes( dqblk.dqb_curblocks, this_bsize ));
+        LOG(log_debug, logtype_afpd, "after calling getquota in uquota_getvolspace!" );
+        LOG(log_debug, logtype_afpd, "dqb_ihardlimit: %u", dqblk.dqb_ihardlimit );
+        LOG(log_debug, logtype_afpd, "dqb_isoftlimit: %u", dqblk.dqb_isoftlimit );
+        LOG(log_debug, logtype_afpd, "dqb_curinodes : %u", dqblk.dqb_curinodes );
+        LOG(log_debug, logtype_afpd, "dqb_bhardlimit: %u", dqblk.dqb_bhardlimit );
+        LOG(log_debug, logtype_afpd, "dqb_bsoftlimit: %u", dqblk.dqb_bsoftlimit );
+        LOG(log_debug, logtype_afpd, "dqb_curblocks : %u", dqblk.dqb_curblocks );
+        LOG(log_debug, logtype_afpd, "dqb_btime     : %u", dqblk.dqb_btime );
+        LOG(log_debug, logtype_afpd, "dqb_itime     : %u", dqblk.dqb_itime );
+        LOG(log_debug, logtype_afpd, "bsize/this_bsize : %u/%u", bsize, this_bsize );
+       LOG(log_debug, logtype_afpd, "dqblk.dqb_bhardlimit size: %u", tobytes( dqblk.dqb_bhardlimit, this_bsize ));
+       LOG(log_debug, logtype_afpd, "dqblk.dqb_bsoftlimit size: %u", tobytes( dqblk.dqb_bsoftlimit, this_bsize ));
+       LOG(log_debug, logtype_afpd, "dqblk.dqb_curblocks  size: %u", tobytes( dqblk.dqb_curblocks, this_bsize ));
 #endif /* DEBUG_QUOTA */ 
 
        /* no limit set for this user. it might be set in the future. */
@@ -730,10 +730,10 @@ int uquota_getvolspace( struct vol *vol, VolSpace *bfree, VolSpace *btotal, cons
        }
 
 #ifdef DEBUG_QUOTA
-        LOG(log_info, logtype_afpd, "bfree          : %u", *bfree );
-        LOG(log_info, logtype_afpd, "btotal         : %u", *btotal );
-        LOG(log_info, logtype_afpd, "bfree          : %uKB", *bfree/1024 );
-        LOG(log_info, logtype_afpd, "btotal         : %uKB", *btotal/1024 );
+        LOG(log_debug, logtype_afpd, "bfree          : %u", *bfree );
+        LOG(log_debug, logtype_afpd, "btotal         : %u", *btotal );
+        LOG(log_debug, logtype_afpd, "bfree          : %uKB", *bfree/1024 );
+        LOG(log_debug, logtype_afpd, "btotal         : %uKB", *btotal/1024 );
 #endif
 
        return( AFP_OK );
index 48d9934645a901ba96ac8342cc3178e4e20f8ba0..2cc9a1f4470f8e75fe7b35b3fd1b6da52f6aec23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_sendfile.c,v 1.10 2009-10-25 09:47:04 didg Exp $
+ * $Id: ad_sendfile.c,v 1.11 2010-01-21 14:14:49 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -83,7 +83,6 @@ ssize_t sys_sendfile(int tofd, int fromfd, off_t *offset, size_t count)
     return sendfile(tofd, fromfd, offset, count);
 }
 
-
 #elif defined(SENDFILE_FLAVOR_BSD )
 /* FIXME untested */
 #error sendfile semantic broken
index 20512de4cdfc300607258d9af019fcc91dc70a18..2f12b2f0d695235c95466b90dd2e0ef53ca1f418 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.c,v 1.15 2009-11-30 15:27:48 didg Exp $
+ * $Id: cnid_dbd.c,v 1.16 2010-01-21 14:14:49 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -497,7 +497,7 @@ void cnid_dbd_close(struct _cnid_db *cdb)
     }
 
     if ((db = cdb->_private) != NULL) {
-        LOG(log_info, logtype_cnid, "closing database connection for volume '%s'", db->db_dir);
+        LOG(log_debug, logtype_cnid, "closing database connection for volume '%s'", db->db_dir);
 
         if (db->fd >= 0)
             close(db->fd);
index 0664b09c2e694e278494ee7620e87547ba721eaf..deb308a010a3068135b15086a828ac2547561c24 100644 (file)
@@ -298,7 +298,7 @@ static int get_syslog_equivalent(enum loglevels loglevel)
 
 void log_init(void)
 {
-    syslog_setup(log_note, 0,
+    syslog_setup(log_info, 0,
                  log_config.syslog_display_options,
                  log_config.facility);
 }
index c62cca14d796bad6825002264e48817f3ba81e11..85c150c4c37cd9290f0aae8a53a99ab606d8660f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: server_child.c,v 1.11 2009-10-14 02:24:05 didg Exp $
+ * $Id: server_child.c,v 1.12 2010-01-21 14:14:49 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -341,7 +341,7 @@ void server_child_kill_one_by_id(server_child *children, const int forkid, const
           child->valid = 1;
          child->idlen = idlen;
           child->clientid = id;
-         LOG(log_info, logtype_default, "Setting clientid (len %d) for %d, boottime %X", idlen, child->pid, boottime);
+         LOG(log_debug, logtype_default, "Setting clientid (len %d) for %d, boottime %X", idlen, child->pid, boottime);
       }
       child = tmp;
     }
index 031954163e73675a6d037098a80f25a813ae657c..289197fb7ac89a76c2da7e0cd91a3abfa2527e96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: server_ipc.c,v 1.3 2009-10-14 01:38:29 didg Exp $
+ * $Id: server_ipc.c,v 1.4 2010-01-21 14:14:49 didg Exp $
  *
  * All rights reserved. See COPYRIGHT.
  *
@@ -100,7 +100,7 @@ static int ipc_get_session (struct ipc_header *ipc, server_child *children)
   
     server_child_kill_one_by_id (children, CHILD_DSIFORK, ipc->child_pid, ipc->uid, idlen, clientid, boottime);
     /* FIXME byte to ascii if we want to log clientid */
-    LOG (log_info, logtype_afpd, "ipc_get_session: len: %u, idlen %d, time %x", ipc->len, idlen, boottime); 
+    LOG (log_debug, logtype_afpd, "ipc_get_session: len: %u, idlen %d, time %x", ipc->len, idlen, boottime); 
     return 0;
 }
 
@@ -154,7 +154,7 @@ int server_ipc_read(server_child *children)
     }
     ipc.msg = buf;
     
-    LOG (log_info, logtype_afpd, "ipc_read: command: %u, pid: %u, len: %u", ipc.command, ipc.child_pid, ipc.len); 
+    LOG (log_debug, logtype_afpd, "ipc_read: command: %u, pid: %u, len: %u", ipc.command, ipc.child_pid, ipc.len); 
 
     switch (ipc.command)
     {
@@ -204,7 +204,7 @@ int server_ipc_write( u_int16_t command, int len, void *msg)
 
    memcpy(p, msg, len);
 
-   LOG (log_info, logtype_afpd, "ipc_write: command: %u, pid: %u, msglen: %u", command, pid, len); 
+   LOG (log_debug, logtype_afpd, "ipc_write: command: %u, pid: %u, msglen: %u", command, pid, len); 
    return write(pipe_fd[1], block, len+IPC_HEADERLEN );
 }