From 153cfeefb7d230f7e0ac85721cd4e67a8bc3ca78 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Mon, 10 Dec 2012 03:49:53 +0500 Subject: [PATCH] Have obsoleted LogTypes that are not part of the audit trail --- src/umbraco.businesslogic/Log.cs | 136 +-------------- src/umbraco.businesslogic/LogTypes.cs | 158 ++++++++++++++++++ .../umbraco.businesslogic.csproj | 1 + 3 files changed, 160 insertions(+), 135 deletions(-) create mode 100644 src/umbraco.businesslogic/LogTypes.cs diff --git a/src/umbraco.businesslogic/Log.cs b/src/umbraco.businesslogic/Log.cs index 26dea86a32..4c24711385 100644 --- a/src/umbraco.businesslogic/Log.cs +++ b/src/umbraco.businesslogic/Log.cs @@ -337,141 +337,7 @@ namespace umbraco.BusinessLogic #endregion } - /// - /// The collection of available log types. - /// - public enum LogTypes - { - /// - /// Used when new nodes are added - /// - [AuditTrailLogItem] - New, - /// - /// Used when nodes are saved - /// - [AuditTrailLogItem] - Save, - /// - /// Used when nodes are opened - /// - [AuditTrailLogItem] - Open, - /// - /// Used when nodes are deleted - /// - [AuditTrailLogItem] - Delete, - /// - /// Used when nodes are published - /// - [AuditTrailLogItem] - Publish, - /// - /// Used when nodes are send to publishing - /// - [AuditTrailLogItem] - SendToPublish, - /// - /// Used when nodes are unpublished - /// - [AuditTrailLogItem] - UnPublish, - /// - /// Used when nodes are moved - /// - [AuditTrailLogItem] - Move, - /// - /// Used when nodes are copied - /// - [AuditTrailLogItem] - Copy, - /// - /// Used when nodes are assígned a domain - /// - [AuditTrailLogItem] - AssignDomain, - /// - /// Used when public access are changed for a node - /// - [AuditTrailLogItem] - PublicAccess, - /// - /// Used when nodes are sorted - /// - [AuditTrailLogItem] - Sort, - /// - /// Used when a notification are send to a user - /// - [AuditTrailLogItem] - Notify, - /// - /// Used when a user logs into the umbraco back-end - /// - Login, - /// - /// Used when a user logs out of the umbraco back-end - /// - Logout, - /// - /// Used when a user login fails - /// - LoginFailure, - /// - /// General system notification - /// - [AuditTrailLogItem] - System, - /// - /// System debugging notification - /// - Debug, - /// - /// System error notification - /// - Error, - /// - /// Notfound error notification - /// - NotFound, - /// - /// Used when a node's content is rolled back to a previous version - /// - [AuditTrailLogItem] - RollBack, - /// - /// Used when a package is installed - /// - [AuditTrailLogItem] - PackagerInstall, - /// - /// Used when a package is uninstalled - /// - [AuditTrailLogItem] - PackagerUninstall, - /// - /// Used when a ping is send to/from the system - /// - Ping, - /// - /// Used when a node is send to translation - /// - [AuditTrailLogItem] - SendToTranslate, - /// - /// Notification from a Scheduled task. - /// - ScheduledTask, - /// - /// Use this log action for custom log messages that should be shown in the audit trail - /// - [AuditTrailLogItem] - Custom - } - - public class LogItem + public class LogItem { public int UserId { get; set; } public int NodeId { get; set; } diff --git a/src/umbraco.businesslogic/LogTypes.cs b/src/umbraco.businesslogic/LogTypes.cs new file mode 100644 index 0000000000..21b168d001 --- /dev/null +++ b/src/umbraco.businesslogic/LogTypes.cs @@ -0,0 +1,158 @@ +using System; + +namespace umbraco.BusinessLogic +{ + /// + /// The collection of available log types. + /// + public enum LogTypes + { + /// + /// Used when new nodes are added + /// + [AuditTrailLogItem] + New, + /// + /// Used when nodes are saved + /// + [AuditTrailLogItem] + Save, + /// + /// Used when nodes are opened + /// + [AuditTrailLogItem] + Open, + /// + /// Used when nodes are deleted + /// + [AuditTrailLogItem] + Delete, + /// + /// Used when nodes are published + /// + [AuditTrailLogItem] + Publish, + /// + /// Used when nodes are send to publishing + /// + [AuditTrailLogItem] + SendToPublish, + /// + /// Used when nodes are unpublished + /// + [AuditTrailLogItem] + UnPublish, + /// + /// Used when nodes are moved + /// + [AuditTrailLogItem] + Move, + /// + /// Used when nodes are copied + /// + [AuditTrailLogItem] + Copy, + /// + /// Used when nodes are assígned a domain + /// + [AuditTrailLogItem] + AssignDomain, + /// + /// Used when public access are changed for a node + /// + [AuditTrailLogItem] + PublicAccess, + /// + /// Used when nodes are sorted + /// + [AuditTrailLogItem] + Sort, + /// + /// Used when a notification are send to a user + /// + [AuditTrailLogItem] + Notify, + + /// + /// Used when a user logs into the umbraco back-end + /// + [Obsolete("Use LogHelper to write log messages")] + Login, + + /// + /// Used when a user logs out of the umbraco back-end + /// + [Obsolete("Use LogHelper to write log messages")] + Logout, + + /// + /// Used when a user login fails + /// + [Obsolete("Use LogHelper to write error log messages")] + LoginFailure, + + /// + /// General system notification + /// + [AuditTrailLogItem] + System, + + + /// + /// System debugging notification + /// + [Obsolete("Use LogHelper to write debug log messages")] + Debug, + + /// + /// System error notification + /// + [Obsolete("Use LogHelper to write error log messages")] + Error, + + /// + /// Notfound error notification + /// + [Obsolete("Use LogHelper to write log messages")] + NotFound, + + /// + /// Used when a node's content is rolled back to a previous version + /// + [AuditTrailLogItem] + RollBack, + /// + /// Used when a package is installed + /// + [AuditTrailLogItem] + PackagerInstall, + /// + /// Used when a package is uninstalled + /// + [AuditTrailLogItem] + PackagerUninstall, + + /// + /// Used when a ping is send to/from the system + /// + [Obsolete("Use LogHelper to write log messages")] + Ping, + /// + /// Used when a node is send to translation + /// + [AuditTrailLogItem] + SendToTranslate, + + /// + /// Notification from a Scheduled task. + /// + [Obsolete("Use LogHelper to write log messages")] + ScheduledTask, + + /// + /// Use this log action for custom log messages that should be shown in the audit trail + /// + [AuditTrailLogItem] + Custom + } +} \ No newline at end of file diff --git a/src/umbraco.businesslogic/umbraco.businesslogic.csproj b/src/umbraco.businesslogic/umbraco.businesslogic.csproj index ca64da53c1..9e8b7b478c 100644 --- a/src/umbraco.businesslogic/umbraco.businesslogic.csproj +++ b/src/umbraco.businesslogic/umbraco.businesslogic.csproj @@ -149,6 +149,7 @@ +