Skip to content

Commit

Permalink
improve logging from ScriptOptionsExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph committed May 29, 2016
1 parent cf75420 commit 9bda819
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/ConfigR.Roslyn.CSharp/Internal/ScriptOptionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static ScriptOptions ForConfigScript(this ScriptOptions options, Uri uri)

foreach (var searchPath in searchPaths)
{
log.DebugFormat("Using search path '{0}'.", searchPath);
log.DebugFormat("Using search path '{0}' for script '{1}'.", searchPath, uri);
}

var references = new List<Assembly>();
Expand All @@ -40,23 +40,28 @@ public static ScriptOptions ForConfigScript(this ScriptOptions options, Uri uri)
if (assembly.IsDynamic)
{
log.TraceFormat(
"Not adding a reference to assembly '{0}' in the script options because it is dynamic.",
assembly.FullName);
"Not adding a reference to assembly '{0}' because it is dynamic, for script '{1}'.",
assembly.FullName,
uri);

continue;
}

if (string.IsNullOrEmpty(assembly.Location))
{
log.TraceFormat(
"Not adding a reference to assembly '{0}' in the script options because it has no location.",
assembly.FullName);
"Not adding a reference to assembly '{0}' because it has no location, for script '{1}'.",
assembly.FullName,
uri);

continue;
}

log.TraceFormat(
"Adding a reference to assembly '{0}' located at '{1}'.", assembly.FullName, assembly.Location);
"Adding a reference to assembly '{0}' located at '{1}', for script '{2}'..",
assembly.FullName,
assembly.Location,
uri);

references.Add(assembly);
}
Expand Down

0 comments on commit 9bda819

Please sign in to comment.