Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SMB logging for the Community Edition #30185

Merged
merged 1 commit into from
Jan 23, 2018
Merged

Conversation

mmattel
Copy link
Contributor

@mmattel mmattel commented Jan 18, 2018

Description

New config.php parameter smb.logging.enable to enable SMB logging.
A parameter for this already exists for the Enterprise edition wnd.logging.enable , but to seperate this properly, a community parameter is needed. The code for this already existed, it was just about to add the new parameter additionally and document it.

Related Issue

Motivation and Context

Discussion with @PVince81

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

owncloud-archive/documentation#3715

@PVince81
Copy link
Contributor

I'm fine with this if you guys are too @jvillafanez @butonic

@codecov
Copy link

codecov bot commented Jan 18, 2018

Codecov Report

Merging #30185 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #30185      +/-   ##
============================================
- Coverage     58.24%   58.23%   -0.01%     
  Complexity    18548    18548              
============================================
  Files          1092     1092              
  Lines         63729    63729              
============================================
- Hits          37116    37115       -1     
- Misses        26613    26614       +1
Impacted Files Coverage Δ Complexity Δ
drone/src/apps/files_trashbin/lib/Expiration.php 96.55% <0%> (-1.73%) 29% <0%> (ø)
drone/src/lib/private/Server.php 82.55% <0%> (ø) 129% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6b9286...5aec95e. Read the comment docs.

@jvillafanez
Copy link
Member

I'd just rename the configuration option: less changes => less problems. Having both seems useless to me.
That option is merely for debugging, so there shouldn't be anyone actively using it, specially due to its heavy verbosity. Changing the name doesn't have any impact.

* @param string $message
* @param int $level
* Return either 'wnd' or 'smb' if the related config values has been enabled
* Return a an existing string if set by the caller
Copy link
Contributor

@phil-davis phil-davis Jan 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/a an existing/an existing
and this text describing the returns could go in the return PHPdoc line below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, will correct this. Thought that a return without an preceeding @ is ok to phpdoc not to parse it as a keyword.

@mmattel
Copy link
Contributor Author

mmattel commented Jan 18, 2018

@jvillafanez wnd is exclusively used by the Enterprise Edition (see https://marketplace.owncloud.com/apps/windows_network_drive) and it is already documented in documentation/admin_manual/configuration/server/config_sample_php_parameters.rst (This enables debug logs for the windows_network_drive app.)

The intention was to not mix up Enterprise and Community parameters and keep this clearly seperated...

@jvillafanez
Copy link
Member

That part of the code is already complex enough to add even more complexity, that's why if the easiest solution (renaming the variable) works, then let's go with it.

Renaming the variable doesn't have any impact in any of both apps (SMB and WND).

The fact that "wnd" is there is because of a slip when this was added here, and kind of laziness to not change it afterwards (me included). There is no need to keep it if we're going to change it. If WND wanted to add special logs or anything, it has to do it on its own app anyway.

We'll have to update the documentation accordingly, but other than that I don't think we need any degree of compatibility here: that switch isn't intended to be actively used so it shouldn't matter if we change the switch.

@PVince81
Copy link
Contributor

Ok, I agree with @jvillafanez.

This setting should anyway not be used in production as it would slow down and fill log files very quickly, so I don't expect anyone to have this. Just in case, we can still mention it in the next release notes.

@mmattel
Copy link
Contributor Author

mmattel commented Jan 19, 2018

Just to have the tasks clear:

  • reject the current code changes in this PR
  • rename the parameter wnd.logging.enable to smb.logging.enable and wnd to smb
  • keep the config.sample.php documentation part
  • change in an seperate PR the current documentation (see above) to reflect this change

Let me know if this is correct or if I missed something.

@jvillafanez
Copy link
Member

Yes, that's it

@mmattel
Copy link
Contributor Author

mmattel commented Jan 22, 2018

If this gets merged, I will do a backport to stable10 if wanted.

@mmattel
Copy link
Contributor Author

mmattel commented Jan 23, 2018

Ready to merge?

@PVince81 PVince81 merged commit 14b6937 into master Jan 23, 2018
@PVince81 PVince81 deleted the smb.logging.enable branch January 23, 2018 10:08
@mmattel
Copy link
Contributor Author

mmattel commented Jan 23, 2018

@PVince81
Shall I backport?

@PVince81
Copy link
Contributor

@mmattel yes, please go ahead. Thanks

mmattel pushed a commit that referenced this pull request Jan 23, 2018
Enable SMB logging for the Community Edition
@phil-davis
Copy link
Contributor

Backport stable10 #30244

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants