Commit Graph

38 Commits (b49216fcb18a1dc949f5a037ea0e6796ba347139)

Author SHA1 Message Date
Oleg Nenashev b49216fcb1
Merge pull request #374 from NextTurn/cli
Improve CLI behaviors with empty arguments
2020-02-05 12:40:43 -05:00
NextTurn ff60522b0d
Use Debug logging level for modes 2020-02-01 10:58:35 +08:00
NextTurn e8e1ee2300
Improve CLI behaviors with empty arguments 2020-02-01 10:58:33 +08:00
NextTurn b3d4b466aa
Don't print stack trace to console for invalid config files 2020-01-24 15:42:07 +08:00
NextTurn 941e67d08c
Simplify syntax 2020-01-20 21:09:39 +08:00
NextTurn 466b5264e1
Annotate other libraries for nullable reference types 2020-01-20 12:19:26 +08:00
NextTurn 5be8708701
Annotate WinSWCore for nullable reference types 2020-01-20 12:18:58 +08:00
NextTurn 8864b676fb
Add new target frameworks 2020-01-14 19:26:26 +08:00
NextTurn 08bae2a682
Use built-in types 2020-01-14 14:05:03 +08:00
NextTurn 9808ae88e8
Clean up styles 2020-01-14 14:04:25 +08:00
Oleg Nenashev 831c7fbb7e
Merge pull request #321 from jeacott1/hidewindow
Add a new `hidewindow` option to suppress windows popup on legacy platforms
2019-08-17 00:44:38 +02:00
Ryan Rupp 47a3ca964a Fix duplicate startup logging 2019-08-13 16:54:13 -05:00
jeacott1 e2bf78f1df adds a <hidewindow>true</hidewindow> config switch
so that launching bat files on legacy machines
running Interactive Services Detection don't balk.
2019-05-28 13:25:17 +09:30
Gerald Senarclens de Grancy f4da4bb8a8 pass ServiceDescriptor when creating wrapperservice 2017-10-30 13:36:17 +01:00
Dinz 221d30f271 Introduced the following new elements. (#247)
* Introduced the following new elements.
1. logname - you can override the name of the log file rather than using the EXE name, this means you don't have to call your EXE a different name, just name the winsw exe different. Default's the name to the EXE as before.
2. outfiledisabled - you can disable writing to the out file. Defaults to false.
3. errfiledisabled - you can disable writing to the error file. Defaults to false.
4. outfilepattern - you can choose the pattern of the out file. Defaults to .out.log.
5. errfilepattern - you can choos the pattern of the error file. Defaults to .err.log.

* Downgraded from C#7.0 syntax.

* Applied reviewers comment

* not required

* removed the key

* Added unit test for new fields logname, outfiledisabled, errfiledisabled and errfilepattern.

Created a new appender called roll-by-size-time see class RollingSizeTimeLogAppender, this appender supports rolling by time and size and rolling at a specific time each day.

Added unit test for the new appender.

Added a new option testwait which is similar to test but waits for the user to press any key before calling the stop method.

* Update loggingAndErrorReporting.md

* Cannot use $ string.format syntax, downgraded code to string.format.

* Another syntax found of $

* Fixed a unit tests
2017-09-18 18:22:01 +02:00
Oleg Nenashev 69857d5d8c Issue #218 - Also support managing Stdin, which is required in the main executable logic 2017-06-08 23:44:24 +02:00
Oleg Nenashev 05092376f3 Issue #218 - ProcessHelper#StartProcessAndCallbackForExit() should redirect STDOUT/STDERR when LogHandler is defined
It restores logging of executables, which has been broken in https://github.com/kohsuke/winsw/pull/220.
Not a regression, because the change has not been released yet
2017-06-08 22:54:44 +02:00
Oleg Nenashev 45f94fe006 [Issue #206] - Prevent printing of logs to the status command
This is rather a workaround to prevent printing of log messages in CLI with the default logging level. I reduced CLI logging verbosity to "Info" and moved the messages polluting the output to Debug. Anyway, these logging levels seem to be reasonable. I also added Info logging for start/stop/install/restart commands just to have a welcome message in CLI.
2017-04-26 00:35:28 +02:00
Oleg Nenashev d192c03638 #183 - Add core logic for the DelayedStart option support (#205)
* #183 - Add core logic for the DelayedStart option support

* #183 - Add unit tests

* #183 - Update documentation and the configuration sample

* #183 - Use API calls to set the DelayedAutoStart flag as @jtnord proposed

* #183 - Refactor the project to use `delayedAutoStart`
2017-04-18 23:23:52 +02:00
Oleg Nenashev f0770a0e15 Introduce the Download#FailOnError option. (#195)
* Introduce the Download#FailOnError option.

The change also adds logging of download operations to the wrapper log

* Add documentation for the failOnError flag
2017-04-11 22:57:39 +02:00
Oleg Nenashev 8cd58531f6 [JENKINS-42744] - Just another proof that some testing coverage is required for the service management logic 2017-03-31 16:01:01 +02:00
Oleg Nenashev 615519f6a3 [JENKINS-42744] - Decouple the process start logic to a separate method in the helper class 2017-03-31 12:06:36 +02:00
Oleg Nenashev d702f9eefe Fixes #54. Do not dump WinSW environment variables to the Event log 2016-12-24 21:56:51 +01:00
Oleg Nenashev ab51b50d85 Issue #85 - Get rid of the deprecated FileHandle API (#167) 2016-12-22 23:40:44 +01:00
Oleg Nenashev 3c6d8e2765 Issue #146 - Improve logging of the Uninstall Operation.
This change does not change the behavior (return code, etc.) of the WinSW logic, but on the other hand it provides diagnostic information.
2016-12-14 18:16:56 +01:00
Oleg Nenashev 12c16e40a7 Logging subsystem refactoring - use log4net (#145)
* Save the progress

* Add log4net Log appender for Windows service events

* Get rid of the IEventLogger API, we use log4net now
2016-12-09 01:41:20 +01:00
Oleg Nenashev 871afa0f2c Generalize top-level logging. All exceptions will be written to loggers 2016-12-03 15:40:20 +01:00
Oleg Nenashev 62b495f088 Merge pull request #133 from oleg-nenashev/processTerminationOnStartup
[Issue #125] Runaway process termination on startup
2016-12-01 08:03:27 +01:00
Oleg Nenashev 92367f44ef RunawayProcessKillerExtension: Check if the environment variable refers service Id before terminating it 2016-11-30 12:37:07 +01:00
Oleg Nenashev 2a07f6af5d Address another Milliseconds misusage (similar to #124) 2016-11-26 23:18:03 +01:00
Oleg Nenashev dfafc2790d [Issue #124] - Prevent the CPU overutilization due to the usage of Milliseconds instead of TotalMsec 2016-11-26 23:16:33 +01:00
Oleg Nenashev 24a5e93b67 Decouple Some process management logic to a standalone ProcessHelper class 2016-11-26 21:37:53 +01:00
Oleg Nenashev 535e8429e0 Add extension point for tracking process startup and termination in extensions 2016-11-26 20:43:39 +01:00
Oleg Nenashev 3af1f72658 Support merging plugins into winsw.exe executable
* Decouple Core components into WinSWCore projects.
* Use ILMerge to merge everything (inc. Plugins) into a single executable

TODO: API Should be refactored before the publishing
TODO: check signing procedure

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

Conflicts:
	src/Core/ServiceWrapper/winsw.csproj

Conflicts:
	src/Core/ServiceWrapper/Main.cs
	src/winsw.sln
2015-02-08 14:28:15 +03:00
Oleg Nenashev 2546168ed3 Integrate changes in WinSW core and SharedDirectoryMapper from #42
The code is compilable, the SharedDirectoryMapper won't be included into WinSW

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

Conflicts:
	src/Core/ServiceWrapper/Main.cs

Conflicts:
	src/Core/ServiceWrapper/ServiceDescriptor.cs
	src/Test/winswTests/winswTests.csproj
	src/winsw.sln
2015-02-08 13:53:26 +03:00
Oleg Nenashev 4a2249d30c Merge branch 'master' into winsw-2.0
Conflicts:
	src/Core/ServiceWrapper/Main.cs
	src/Test/winswTests/winswTests.csproj

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2015-02-08 13:44:30 +03:00
Oleg Nenashev 98268b24cc Integrate log4net into WinSW, migrate wrapper.log engine
TODOs:
    Migrate EventLogs to log4net
    Delegate exceptions handling to log4net
    Allows setting up log levels from ServiceDescriptor
    (?) Migrate STDERR/STDOUT logs to log4net
    (?) Support XML configurations of log4net loggers

Related to #69

Signed-off-by: Oleg Nenashev o.v.nenashev@gmail.com
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2015-02-02 10:41:54 +03:00
Oleg Nenashev 51d1a8e8af Rework the project structure.
* move WinSW core to a separate folder
* create scr on the top level to store all the stuff inside
Related to #66

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2015-01-31 14:40:52 +03:00