Commit Graph

53 Commits (e37c6415201fd27a5dbf263dda05ec6a25285c20)

Author SHA1 Message Date
NextTurn e37c641520
Replace or remove `SetServiceStatus` calls 2020-03-29 17:23:07 +08:00
NextTurn 23c2202406
Support security descriptor string 2020-03-28 14:50:19 +08:00
NextTurn 80e99d8426
Rework P/Invoke signatures 2020-03-24 23:37:02 +08:00
NextTurn b991f8c9f1
Revert CLI behaviors in non-interactive mode 2020-02-21 14:04:29 +08:00
Oleg Nenashev 0f0ed5f850
Merge pull request #408 from NextTurn/download
Update exception handling for downloads
2020-02-16 07:38:26 +01:00
NextTurn bf09ea36f9
Update downloading 2020-02-13 10:45:41 +08:00
Oleg Nenashev 3753bce369
Merge pull request #387 from NextTurn/stop
Treat ERROR_SERVICE_CANNOT_ACCEPT_CTRL as success for stop command
2020-02-12 21:04:57 +01:00
NextTurn da2772c6c4
Treat ERROR_SERVICE_CANNOT_ACCEPT_CTRL as success for stop command 2020-02-10 19:14:52 +08:00
NextTurn 16205acbc8
Treat ERROR_SERVICE_ALREADY_RUNNING as success for start command 2020-02-10 19:08:28 +08:00
NextTurn 368b99d8a1
Implement atomic file movement 2020-02-10 18:28:59 +08:00
Oleg Nenashev 96c03efb0a
Merge pull request #397 from NextTurn/nullable
Annotate more nullable variables
2020-02-07 04:38:13 -05:00
Oleg Nenashev dc10d4d3ce
Merge pull request #367 from NextTurn/download
Parallelize downloads in .NET 4.6.1 and .NET Core bundles
2020-02-06 05:31:12 -05:00
NextTurn 30c5994c42
Migrate to MMI 2020-02-06 10:58:37 +08:00
NextTurn da71f5dd83
Annotate more nullable variables 2020-02-06 10:55:13 +08:00
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 ba328e3162
Optimize Download 2020-01-21 11:16:11 +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