[SERVER-1189] Improves logging in util/ntservice.cpp Created: 03/Jun/10  Updated: 12/Jul/16  Resolved: 17/Dec/10

Status: Closed
Project: Core Server
Component/s: Admin, Tools, Usability
Affects Version/s: 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4
Fix Version/s: 1.5.3

Type: Improvement Priority: Minor - P4
Reporter: Justin Dearing Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All windows versions


Participants:

 Description   

ntservice.cpp contains code for adding and removing mongod.exe (and mongos.exe). What it lacks is logging.

I have logging code in my github repository. I will add the commits in comments momentarily.



 Comments   
Comment by Justin Dearing [ 12/Jun/10 ]

According to the MSDN thre SCM functions call SetLastError(). Therefore I can call GetLastError() and FormatMessage() for some more accurate error messages.

I'll open a separate ticket for that though.

Comment by Justin Dearing [ 11/Jun/10 ]

FOrgot to link to the commit.

http://github.com/zippy1981/mongo/commit/f0e6536190de865e294668f122fab29d2c9cbcd8

Comment by Justin Dearing [ 11/Jun/10 ]

Some error message refinement. There might be one more level of refinement, if the SCM api calls set GetLastError() to something useful.

Comment by auto [ 04/Jun/10 ]

Author:

{'login': 'zippy1981', 'name': 'Justin Dearing', 'email': 'zippy1981@gmail.com'}

Message: Clean remerge of SERVER-1189 Improves logging in util/ntservice.cpp

I just manually recomitted the changes.
http://github.com/mongodb/mongo/commit/efde5cf575afd1cb8ffe9493d0452042287f3a99

Comment by Justin Dearing [ 04/Jun/10 ]

Ok a much cleaner commit this time for master.

http://github.com/zippy1981/mongo/commit/4523761b9460c6c1d0c3a9a163bc0baab63533a6

Comment by Justin Dearing [ 04/Jun/10 ]

Yes I'll pull 10gens master and v1.4 to new branches in my repo and make a clean commit from that.

Linus promised me that git would make merging easy. I want my $0.00 back.

Comment by Eliot Horowitz (Inactive) [ 03/Jun/10 ]

Don't think i can merge that in at all.

Want to start over and try to make a clean change?

Comment by Justin Dearing [ 03/Jun/10 ]

Once again this problably wont be a clean cherry pick and I apologize:

v1.4:
http://github.com/zippy1981/mongo/commit/9c2397c969f559010512921dc863c85478d3f583
http://github.com/zippy1981/mongo/commit/0888f03a19e369cd8095c5a87171b77c5618d6bf

Master forthcoming.

Generated at Thu Feb 08 02:56:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.