Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
#region License//The contents of this file are subject to the Mozilla Public License//Version 1.1 (the "License"); you may not use this file except in//compliance with the License. You may obtain a copy of the License at//http://www.mozilla.org/MPL///Software distributed under the License is distributed on an "AS IS"//basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the//License for the specific language governing rights and limitations//under the License.#endregionusingSystem;namespaceMigrator.Loggers{/// <summary>/// Console logger for the migration mediator/// </summary>publicclassConsoleLogger:ILogger{privateint_widthFirstColumn=5;privatebool_trace=false;privatelog4net.ILog_logger=log4net.LogManager.GetLogger("Migrator"); public ConsoleLogger(bool trace)
{
_trace = trace;
- (_logger.Logger as log4net.Repository.Hierarchy.Logger).AddAppender(new log4net.Appender.ConsoleAppender());
+ var layout = new log4net.Layout.PatternLayout("%message");+ (_logger.Logger as log4net.Repository.Hierarchy.Logger).AddAppender(new log4net.Appender.ConsoleAppender(layout));
(_logger.Logger as log4net.Repository.Hierarchy.Logger).Level = log4net.Core.Level.All;
} public void Started(int currentVersion, int finalVersion)
{
-- Console.WriteLine("Migrating from Current Version: {0} to version {1}", currentVersion, finalVersion);+ _logger.InfoFormat("Migrating from Current Version: {0} to version {1}", currentVersion, finalVersion);
- }
public void MigrateUp(int version, string migrationName)
{
if (this._trace)
{
-Console.WriteLine("{0} {1}", version.ToString().PadLeft(_widthFirstColumn), migrationName);+ _logger.InfoFormat("{0} {1}", version.ToString().PadLeft(_widthFirstColumn), migrationName);
}
else
- {
--Console.Write("..{0}", version.ToString());+ {
_logger.InfoFormat("..{0}", version.ToString());
}
}
publicvoidMigrateDown(intversion,stringmigrationName){MigrateUp(version,migrationName);}publicvoidSkipping(intversion){Console.WriteLine("{0} {1}",version.ToString().PadLeft(_widthFirstColumn),"<Migration not found>");}publicvoidRollingBack(intoriginalVersion){Console.WriteLine("Rolling back to migration {0}",originalVersion);}publicvoidException(intversion,stringmigrationName,Exceptionex){Console.WriteLine("{0} Error in migration {1} : {2}","".PadLeft(_widthFirstColumn),version,ex.Message);this.TraceException(ex);}publicvoidException(stringformat,Exceptionex,paramsobject[]args){Console.Write("{0} ","".PadLeft(_widthFirstColumn));Console.WriteLine(format,args);this.TraceException(ex);}publicvoidFinished(intoriginalVersion,intcurrentVersion){if(_trace)Console.WriteLine("Finished migrating to version {0}",currentVersion);elseConsole.Write(".. Done.");}publicvoidLog(stringformat,paramsobject[]args){Console.Write("{0} ","".PadLeft(_widthFirstColumn));Console.WriteLine(format,args);}publicvoidWarn(stringformat,paramsobject[]args){Console.Write("{0} Warning! : ","".PadLeft(_widthFirstColumn));Console.WriteLine(format,args);}publicvoidTrace(stringformat,paramsobject[]args){if(_trace){Log(format,args);}}privatevoidTraceException(Exceptionex){if(_trace){Console.WriteLine("========= Error detail =========");Console.WriteLine(ex);Console.WriteLine(ex.StackTrace);Exceptioniex=ex.InnerException;while(ex.InnerException!=null){Console.WriteLine("Caused by: {0}",ex.InnerException);Console.WriteLine(ex.InnerException.StackTrace);iex=iex.InnerException;}Console.WriteLine("======================================");}}}}
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.