Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
ca1c4d00
Commit
ca1c4d00
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Add option to request RoboCopy logging to a file.
parent
f5ad2943
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ATxCommon/Serializables/ServiceConfig.cs
+5
-0
5 additions, 0 deletions
ATxCommon/Serializables/ServiceConfig.cs
ATxService/RoboCommand.cs
+14
-0
14 additions, 0 deletions
ATxService/RoboCommand.cs
Resources/conf/config.common.xml
+3
-0
3 additions, 0 deletions
Resources/conf/config.common.xml
with
22 additions
and
0 deletions
ATxCommon/Serializables/ServiceConfig.cs
+
5
−
0
View file @
ca1c4d00
...
...
@@ -78,6 +78,11 @@ namespace ATxCommon.Serializables
/// </summary>
public
bool
Debug
{
get
;
set
;
}
=
false
;
/// <summary>
/// The full path of a file to be used for RoboCopy log messages. Default: "" (off).
/// </summary>
public
string
RoboCopyLog
{
get
;
set
;
}
=
""
;
/// <summary>
/// The interval (in ms) for checking for new files and system parameters. Default: 1000.
/// </summary>
...
...
This diff is collapsed.
Click to expand it.
ATxService/RoboCommand.cs
+
14
−
0
View file @
ca1c4d00
...
...
@@ -80,7 +80,21 @@ namespace ATxService
// retry options
_roboCommand
.
RetryOptions
.
RetryCount
=
0
;
_roboCommand
.
RetryOptions
.
RetryWaitTime
=
0
;
// robocopy logging (NOTE: the "OutputToRoboSharpAndLog" option is required as
// otherwise messages will go to the log only and can't be processed by RoboSharp
// any more, resulting in no callbacks and therefore no progress reports etc.)
if
(!
string
.
IsNullOrWhiteSpace
(
_config
.
RoboCopyLog
))
{
Log
.
Debug
(
"Setting RoboCopy log file to [{0}]"
,
_config
.
RoboCopyLog
);
_roboCommand
.
LoggingOptions
=
new
LoggingOptions
{
LogPath
=
_config
.
RoboCopyLog
,
OutputToRoboSharpAndLog
=
true
,
VerboseOutput
=
true
};
}
_roboCommand
.
Start
();
Log
.
Info
(
"Transfer started, total size: {0}"
,
Conv
.
BytesToString
(
_status
.
CurrentTransferSize
));
Log
.
Trace
(
"RoboCopy command options: {0}"
,
_roboCommand
.
CommandOptions
);
...
...
This diff is collapsed.
Click to expand it.
Resources/conf/config.common.xml
+
3
−
0
View file @
ca1c4d00
...
...
@@ -33,6 +33,9 @@
<!-- Debug: enable or disable debug log messages -->
<Debug>
true
</Debug>
<!-- RoboCopyLog: a file to be used for RoboCopy log messages.-->
<RoboCopyLog>
C:\Temp\autotx-robocopy.log
</RoboCopyLog>
<!-- ServiceTimer: interval (in ms) for checking files and parameters -->
<ServiceTimer>
1000
</ServiceTimer>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment