You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this is the correct repository for opening this issue.
I have verified no other issues exist related to my problem.
I have verified this is not an issue for a specific package.
I have verified this issue is not security related.
I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
When the Chocolatey logs reach their configured rotation size, non-admin users will receive a log4net error message: log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [C:\ProgramData\chocolatey\logs\chocolatey.log] already exists.
What is Expected?
Log file rotation to happen.
How Did You Get This To Happen?
Install Chocolatey.
Fill up the chocolatey.log and choco.summary.log files.
From a non-administrator session run choco list | Out-Null (The Out-Null is to drop the standard output stream as it's not necessary for this.)
Check the log files sizes (ls c:\programdata\chocolatey\logs) to see they're about 15 MB
Receive message on standard error:
log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [C:\ProgramData\chocolatey\logs\chocolatey.log] already exists.
log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [C:\ProgramData\chocolatey\logs\choco.summary.log] already exists.
Check the log file sizes again to see that they are now much less (my test system were 388 and 12,202 bytes)
Repeat steps 2 - 6 from an Administrator terminal. You should not receive the log4net error message, and should now have a choco.summary.1.log and chocolatey.1.log file that are ~15 MB in size.
System Details
Operating System: 10
Windows PowerShell Version: 5.1
Chocolatey CLI Version: 2.2.2
Chocolatey Licensed Extension version: N/A
Chocolatey License type (Professional / Business / ?): N/A
Terminal/Emulator: conhost
Installed Packages
N/A
Output Log
The logs do not contain anything about the log4net error. Just the list command that was run.
Additional Context
N/A
The text was updated successfully, but these errors were encountered:
This is caused by the permissions in the $env:ChocolateyInstall\logs folder not having write permissions for non-admin users. There isn't anything we can around this. As the logs are continuing to grow, there is nothing being lost. When Chocolatey CLI is next run as an admin user, the logs will rotate as normal.
We should document this error, what it means, that it only happens at log rotation time, and that running once as admin user will resolve it for that rotation.
Checklist
What You Are Seeing?
When the Chocolatey logs reach their configured rotation size, non-admin users will receive a log4net error message:
log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [C:\ProgramData\chocolatey\logs\chocolatey.log] already exists.
What is Expected?
Log file rotation to happen.
How Did You Get This To Happen?
chocolatey.log
andchoco.summary.log
files.choco list | Out-Null
(TheOut-Null
is to drop the standard output stream as it's not necessary for this.)ls c:\programdata\chocolatey\logs
) to see they're about 15 MBchoco.summary.1.log
andchocolatey.1.log
file that are ~15 MB in size.System Details
Installed Packages
Output Log
The logs do not contain anything about the log4net error. Just the list command that was run.
Additional Context
N/A
The text was updated successfully, but these errors were encountered: