Add zypp::setZyppLogfile: empty string for off, '-' for stderr or file
authorMichael Andres <ma@suse.de>
Wed, 3 Nov 2010 12:41:38 +0000 (13:41 +0100)
committerMichael Andres <ma@suse.de>
Wed, 3 Nov 2010 12:41:38 +0000 (13:41 +0100)
swig/zypp.i

index 67c17ae..c9584a7 100644 (file)
@@ -158,3 +158,19 @@ namespace zypp {
 %include <zypp/ZYpp.h>
 
 %include "ZYppFactory.i"
+
+//
+// helper
+//
+%{
+#include <zypp/base/LogControl.h>
+%}
+%inline %{
+  namespace zypp
+  {
+    void setZyppLogfile( const std::string & file_r )
+    {
+      base::LogControl::instance().logfile( file_r );
+    }
+  }
+%}