Update: Support extended logging arguments
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0513.1423")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0513.1423")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0513.1423")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0514.1205")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0514.1205")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
||||||
@@ -91,6 +91,7 @@
|
|||||||
<Compile Include="Logging\SystemLog.cs" />
|
<Compile Include="Logging\SystemLog.cs" />
|
||||||
<Compile Include="Logging\Targets\LogLiveContext.cs" />
|
<Compile Include="Logging\Targets\LogLiveContext.cs" />
|
||||||
<Compile Include="Logging\Targets\LogPersistContext.cs" />
|
<Compile Include="Logging\Targets\LogPersistContext.cs" />
|
||||||
|
<Compile Include="Logging\Targets\LogPersistContextInitializer.cs" />
|
||||||
<Compile Include="Logging\Utilities.cs" />
|
<Compile Include="Logging\Utilities.cs" />
|
||||||
<Compile Include="Plugins\CommunityInterop\PluginLibraryUpdateTask.cs" />
|
<Compile Include="Plugins\CommunityInterop\PluginLibraryUpdateTask.cs" />
|
||||||
<Compile Include="Plugins\Features\UIExtension\Results\LiteralResult.cs" />
|
<Compile Include="Plugins\Features\UIExtension\Results\LiteralResult.cs" />
|
||||||
@@ -152,7 +153,7 @@
|
|||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace Disco.Services.Logging.Models
|
|||||||
public int EventTypeId { get; set; }
|
public int EventTypeId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime Timestamp { get; set; }
|
public DateTime Timestamp { get; set; }
|
||||||
|
[Column(TypeName="ntext"), MaxLength]
|
||||||
public string Arguments { get; set; }
|
public string Arguments { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,7 @@ namespace Disco.Services.Logging.Models
|
|||||||
object[] Arguments = null;
|
object[] Arguments = null;
|
||||||
if (jsonArguments != null)
|
if (jsonArguments != null)
|
||||||
{
|
{
|
||||||
//var alArguments = fastJSON.JSON.Instance.Parse(jsonArguments) as ArrayList; // Old fastJSON Implementation
|
|
||||||
Arguments = JsonConvert.DeserializeObject<object[]>(jsonArguments);
|
Arguments = JsonConvert.DeserializeObject<object[]>(jsonArguments);
|
||||||
//if (alArguments != null)
|
|
||||||
//{
|
|
||||||
// Arguments = alArguments.ToArray();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
return Create(logModule, eventType, Timestamp, Arguments);
|
return Create(logModule, eventType, Timestamp, Arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ namespace Disco.Services.Logging.Targets
|
|||||||
{
|
{
|
||||||
public LogPersistContext(string ConnectionString) : base(ConnectionString) { }
|
public LogPersistContext(string ConnectionString) : base(ConnectionString) { }
|
||||||
|
|
||||||
|
static LogPersistContext()
|
||||||
|
{
|
||||||
|
Database.SetInitializer<LogPersistContext>(new LogPersistContextInitializer());
|
||||||
|
}
|
||||||
|
|
||||||
public DbSet<Models.LogModule> Modules { get; set; }
|
public DbSet<Models.LogModule> Modules { get; set; }
|
||||||
public DbSet<Models.LogEventType> EventTypes { get; set; }
|
public DbSet<Models.LogEventType> EventTypes { get; set; }
|
||||||
public DbSet<Models.LogEvent> Events { get; set; }
|
public DbSet<Models.LogEvent> Events { get; set; }
|
||||||
|
|
||||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
//modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Disco.Services.Logging.Targets
|
||||||
|
{
|
||||||
|
public class LogPersistContextInitializer : IDatabaseInitializer<LogPersistContext>
|
||||||
|
{
|
||||||
|
public void InitializeDatabase(LogPersistContext context)
|
||||||
|
{
|
||||||
|
if (!context.Database.Exists())
|
||||||
|
{
|
||||||
|
context.Database.Create();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0514.1205")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0514.1205")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0513.1423")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0513.1342")]
|
[assembly: AssemblyVersion("1.2.0513.1423")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0513.1342")]
|
[assembly: AssemblyFileVersion("1.2.0513.1423")]
|
||||||
Reference in New Issue
Block a user