From: Eric Bollengier Date: Mon, 13 Nov 2006 18:20:22 +0000 (+0000) Subject: ebl drop bacula log patch X-Git-Tag: Release-2.0.0~303 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=794b73e9e031d3f1e7b7ae7786570cd6932b4e74;p=bacula%2Fbacula ebl drop bacula log patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3614 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/INSTALL b/gui/bweb/INSTALL index ab1f5502fd..6033a41f62 100644 --- a/gui/bweb/INSTALL +++ b/gui/bweb/INSTALL @@ -139,43 +139,18 @@ bconsole -n option. ################ BACULA LOG #################################### -To use Bweb log engine, you must apply this little patch and have the -new Log table in your database. - -After, you can fill your database with : -while true; do - tail -f /tmp/log.sql | bacula -u bacula bacula -done - -cd bacula-src -patch -p1 < message.patch ---- cvs/src/lib/message.c 2006-07-27 21:06:20.000000000 +0200 -+++ cvs/src/lib/message.c.director 2006-07-28 13:46:49.171083494 +0200 -@@ -716,6 +716,20 @@ - } - fputs(dt, d->fd); - fputs(msg, d->fd); -+ void db_escape_string(char *snew, char *old, int len); -+ if (jcr) { -+ char ed1[50]; -+ POOL_MEM cmd(PM_MESSAGE); -+ int len = strlen(msg); -+ char *p = (char *)malloc(len * 2 + 1); -+ db_escape_string(p, msg, len); -+ FILE *fp = fopen("/tmp/log.sql", "a"); -+ if (fp) { -+ fprintf(fp, "INSERT INTO Log (Time, JobId, LogText) VALUES (Now(), %s, '%s');\n", edit_int64(jcr->JobId, ed1), p); -+ fclose(fp); -+ } -+ } -+ - break; - case MD_DIRECTOR: - Dmsg1(850, "DIRECTOR for following msg: %s", msg); - - -This patch is only for director, this will breaks the rest. -you can revert it with patch -p1 -R < message.patch +To use Bweb log engine you MUST use catalog message type. + +Messages { + Name = Standard + + operator = root@localhost = mount + console = all, !skipped, !saved + append = "/tmp/bacula/var/bacula/working/log" = all, !skipped + + catalog = all, !skipped, !saved +} + ################ BWEB LIMITATION ###############################