public void Tut_ScopeDomains() { UT_INIT(); Log.SetVerbosity( tutLog= new MemoryLogger( "Tutlog" ), Verbosity.Verbose ); Log.AddDebugLogger(); TutScopeDom tsd= new TutScopeDom(); tsd.Extract( "myfile.zip", null ); #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput( "Tut_ScopeDomains.txt", tutLog.MemoryLog ); tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; #endif // do it once to set the tab positions of the meta info... { Zipper zip= new Zipper(); zip.Compress( "myfile.zip", null ); zip.Extract( "myfile.zip", null ); #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; #endif } // ...and again { Zipper zip= new Zipper(); zip.Compress( "myfile.zip", null ); zip.Extract( "myfile.zip", null ); } #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput( "Tut_ScopeDomains_Zipper.txt", tutLog.MemoryLog ); #endif //---------- with scope path --------------- //! [Tut_ScopeDomains_Path] Log.SetDomain( "UTIL", Scope.Path ); //! [Tut_ScopeDomains_Path] #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; #endif // do it once to set the tab positions of the meta info... { Zipper zip= new Zipper(); zip.Compress( "myfile.zip", null ); zip.Extract( "myfile.zip", null ); #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; tutLog.CntLogs= 0; #endif } // ...and again { Zipper zip= new Zipper(); zip.Compress( "myfile.zip", null ); zip.Extract( "myfile.zip", null ); } #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput( "Tut_ScopeDomains_Zipper_Path.txt", tutLog.MemoryLog ); tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; #endif Log.SetDomain( null, Scope.Path ); Log.SetDomain( null, Scope.Filename ); //! [Tut_ScopeDomains_ParamDom] Log.SetDomain( "METHOD", Scope.Method ); Log.Info( "No domain parameter given" ); Log.Info( "PARAM", "Domain parameter \"PARAM\" given" ); //! [Tut_ScopeDomains_ParamDom] // clear autosizes, repeat it twice #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.AutoSizes.Reset(); #endif Log.Info( "No domain parameter given" ); Log.Info( "PARAM", "Domain parameter \"PARAM\" given" ); tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; Log.Info( "No domain parameter given" ); Log.Info( "PARAM", "Domain parameter \"PARAM\" given" ); #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput( "Tut_ScopeDomains_ParamDom.txt", tutLog.MemoryLog ); tutLog.MemoryLog.Clear(); tutLog.CntLogs= 0; #endif //! [Tut_ScopeDomains_ParamDom_2] Log.SetDomain( "READ", Scope.Method ); Log.Info( "Reading file" ); //... //... Log.Info( "/CONFIG", "Path not found." ); //... //! [Tut_ScopeDomains_ParamDom_2] #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput( "Tut_ScopeDomains_ParamDom_2.txt", tutLog.MemoryLog ); #endif Log.RemoveLogger( tutLog ); }
public void Tut_ScopeDomains() { UT_INIT(); Log.SetVerbosity(tutLog = new MemoryLogger("Tutlog"), Verbosity.Verbose); Log.AddDebugLogger(); TutScopeDom tsd = new TutScopeDom(); tsd.Extract("myfile.zip", null); #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput("Tut_ScopeDomains.txt", tutLog.MemoryLog); tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; #endif // do it once to set the tab positions of the meta info... { Zipper zip = new Zipper(); zip.Compress("myfile.zip", null); zip.Extract("myfile.zip", null); #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; #endif } // ...and again { Zipper zip = new Zipper(); zip.Compress("myfile.zip", null); zip.Extract("myfile.zip", null); } #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput("Tut_ScopeDomains_Zipper.txt", tutLog.MemoryLog); #endif //---------- with scope path --------------- //! [Tut_ScopeDomains_Path] Log.SetDomain("UTIL", Scope.Path); //! [Tut_ScopeDomains_Path] #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; #endif // do it once to set the tab positions of the meta info... { Zipper zip = new Zipper(); zip.Compress("myfile.zip", null); zip.Extract("myfile.zip", null); #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; tutLog.CntLogs = 0; #endif } // ...and again { Zipper zip = new Zipper(); zip.Compress("myfile.zip", null); zip.Extract("myfile.zip", null); } #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput("Tut_ScopeDomains_Zipper_Path.txt", tutLog.MemoryLog); tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; #endif Log.SetDomain(null, Scope.Path); Log.SetDomain(null, Scope.Filename); //! [Tut_ScopeDomains_ParamDom] Log.SetDomain("METHOD", Scope.Method); Log.Info("No domain parameter given"); Log.Info("PARAM", "Domain parameter \"PARAM\" given"); //! [Tut_ScopeDomains_ParamDom] // clear autosizes, repeat it twice #if (ALOX_DBG_LOG || ALOX_REL_LOG) tutLog.AutoSizes.Reset(); #endif Log.Info("No domain parameter given"); Log.Info("PARAM", "Domain parameter \"PARAM\" given"); tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; Log.Info("No domain parameter given"); Log.Info("PARAM", "Domain parameter \"PARAM\" given"); #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput("Tut_ScopeDomains_ParamDom.txt", tutLog.MemoryLog); tutLog.MemoryLog.Clear(); tutLog.CntLogs = 0; #endif //! [Tut_ScopeDomains_ParamDom_2] Log.SetDomain("READ", Scope.Method); Log.Info("Reading file"); //... //... Log.Info("/CONFIG", "Path not found."); //... //! [Tut_ScopeDomains_ParamDom_2] #if (ALOX_DBG_LOG || ALOX_REL_LOG) SaveTutorialOutput("Tut_ScopeDomains_ParamDom_2.txt", tutLog.MemoryLog); #endif Log.RemoveLogger(tutLog); }