Skip to content

Commit 6981b70

Browse files
committed
Separates password and ma operations into separate log files
1 parent 8780d07 commit 6981b70

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

src/Lithnet.GoogleApps.MA.Setup/Product.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Product Id="*"
44
Name="Lithnet GoogleApps Management Agent"
55
Language="1033"
6-
Version="1.1.5999"
6+
Version="1.1.6000"
77
Manufacturer="Lithnet"
88
UpgradeCode="3410d571b358426281edb2990ae57cae" >
99

src/Lithnet.GoogleApps.MA.UnitTests/TestParameters.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ public IEnumerable<string> WebsitesAttributeFixedTypes
139139
this.ServiceAccountEmailAddress,
140140
this.UserEmailAddress,
141141
this.GetCertificate(this.KeyFilePath, this.KeyFilePassword));
142+
143+
public string MALogFile => Path.Combine(this.LogFilePath, "ma-operations.log");
144+
145+
public string PasswordOperationLogFile => Path.Combine(this.LogFilePath, "password-operations.log");
142146
}
143147
}
144148
}

src/Lithnet.GoogleApps.MA/Interfaces/IManagementAgentParameters.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ internal interface IManagementAgentParameters
4141

4242
string KeyFilePath { get; }
4343

44-
string LogFilePath { get; }
44+
string MALogFile { get; }
4545

46+
string PasswordOperationLogFile { get; }
47+
4648
bool DoNotGenerateDelta { get; }
4749

4850
string Domain { get; }

src/Lithnet.GoogleApps.MA/ManagementAgent.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void OpenExportConnection(KeyedCollection<string, ConfigParameter> config
112112
this.DeltaPath = Path.Combine(MAUtils.MAFolder, ManagementAgent.DeltaFile);
113113
this.SetHttpDebugMode();
114114

115-
Logger.LogPath = this.Configuration.LogFilePath;
115+
Logger.LogPath = this.Configuration.MALogFile;
116116
Logger.WriteLine("Opening export connection");
117117

118118
this.timer = new Stopwatch();
@@ -215,7 +215,7 @@ public void CloseExportConnection(CloseExportConnectionRunStep exportRunStep)
215215
public OpenImportConnectionResults OpenImportConnection(KeyedCollection<string, ConfigParameter> configParameters, Schema types, OpenImportConnectionRunStep importRunStep)
216216
{
217217
this.Configuration = new ManagementAgentParameters(configParameters);
218-
Logger.LogPath = this.Configuration.LogFilePath;
218+
Logger.LogPath = this.Configuration.MALogFile;
219219

220220
this.importRunStep = importRunStep;
221221
this.operationSchemaTypes = types;
@@ -747,7 +747,7 @@ public void OpenPasswordConnection(KeyedCollection<string, ConfigParameter> conf
747747
{
748748
this.Configuration = new ManagementAgentParameters(configParameters);
749749
this.SetHttpDebugMode();
750-
Logger.LogPath = this.Configuration.LogFilePath;
750+
Logger.LogPath = this.Configuration.PasswordOperationLogFile;
751751

752752
ConnectionPools.InitializePools(this.Configuration.Credentials, 1, 1, 1, 1);
753753
}

src/Lithnet.GoogleApps.MA/ManagementAgentParameters.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,25 @@ public string LogFilePath
158158
}
159159
}
160160

161+
public string MALogFile
162+
{
163+
get
164+
{
165+
string root = Path.GetDirectoryName(this.LogFilePath);
166+
167+
return root == null ? null : Path.Combine(root, "ma-operations.log");
168+
}
169+
}
170+
171+
public string PasswordOperationLogFile
172+
{
173+
get
174+
{
175+
string root = Path.GetDirectoryName(this.LogFilePath);
176+
177+
return root == null ? null : Path.Combine(root, "password-operations.log");
178+
}
179+
}
161180

162181
public bool DoNotGenerateDelta
163182
{

src/Lithnet.GoogleApps.MA/ManagementAgentParametersBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ internal abstract class ManagementAgentParametersBase
6969

7070
protected const string WebsitesFixedTypeFormatParameter = "Websites fixed types";
7171

72-
protected const string LogFilePathParameter = "Log file";
72+
protected const string LogFilePathParameter = "Log file path";
7373

7474
protected static string[] RequiredScopes = new string[]
7575
{

0 commit comments

Comments
 (0)