That worked fine. I also added data['feature'] check in route guard.
What is your product version? 7.2.3 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .net core
log4net.config
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" >
<file value="App_Data/Logs/Logs.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10000KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" />
</layout>
</appender>
<root>
<appender-ref ref="RollingFileAppender" />
<level value="DEBUG" />
</root>
</log4net>
Example usage of Logger:
Logger.Log(LogSeverity.Info, $"Storage Cost is already calculated for {Clock.Now.ToShortDateString()}");
Sample Snippet from Logs.txt
DEBUG 2019-10-21 14:37:13,537 [1 ] nnel.SCONotificationWorker - Start background worker: Castle.Proxies.SCONotificationWorkerProxy
DEBUG 2019-10-21 14:37:13,707 [1 ] kActivatorService.WAWorker - Start background worker: Castle.Proxies.WAWorkerProxy
DEBUG 2019-10-21 14:37:13,885 [1 ] ker.SCICheckerWorker - Start background worker: Castle.Proxies.SCICheckerWorkerProxy
INFO 2019-10-21 14:37:25,980 [4 ] kActivatorService.WAWorker - Running WAWorker job
DEBUG 2019-10-21 14:37:26,200 [1 ] dNotifications.DelayedNotificationWorker - Start background worker: Castle.Proxies.DelayedNotificationWorkerProxy
DEBUG 2019-10-21 14:37:26,233 [1 ] Providers.ECNotifierWorker - Start background worker: Castle.Proxies.ECNotifierWorkerProxy
DEBUG 2019-10-21 14:37:26,269 [1 ] onSync.SCISyncWorker - Start background worker: Castle.Proxies.SCISyncWorkerProxy
DEBUG 2019-10-21 14:37:26,303 [1 ] ync.SCIPollingWorker - Start background worker: Castle.Proxies.SCIPollingWorkerProxy
DEBUG 2019-10-21 14:37:26,332 [1 ] SCIFastPollingWorker - Start background worker: Castle.Proxies.SCIFastPollingWorkerProxy
DEBUG 2019-10-21 14:37:26,675 [1 ] .Technology.Common.OldDataShredderWorker - Start background worker: Castle.Proxies.OldDataShredderWorkerProxy
DEBUG 2019-10-21 14:37:26,705 [1 ] nology.Common.FrequentDataShredderWorker - Start background worker: Castle.Proxies.FrequentDataShredderWorkerProxy
DEBUG 2019-10-21 14:37:28,494 [1 ] .LPIBackgroundWorker - Start background worker: Castle.Proxies.LPIBackgroundWorkerProxy
DEBUG 2019-10-21 14:37:28,899 [1 ] .Rs.I.IRWorker - Start background worker: Castle.Proxies.IRWorkerProxy
DEBUG 2019-10-21 14:37:30,045 [1 ] eCosts.WCRBackgroundWorker - Start background worker: Castle.Proxies.WCRBackgroundWorkerProxy
DEBUG 2019-10-21 14:37:30,695 [1 ] s.LPOREmailSender - Start background worker: Castle.Proxies.LPOREmailSenderProxy
ERROR 2019-10-21 14:37:33,507 [4 ] kActivatorService.WAWorker - Failed to fix hooks for SCC with Id - 295
SSharp.SException: address: for this topic has already been taken
at SSharp.SService.CheckResponseExceptions(HttpResponseMessage response, String rawResponse)
at SSharp.SService.<>c__DisplayClass25_0`1.<<ExecuteRequestAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at SSharp.DefaultRequestExecutionPolicy.Run[T](CloneableRequestMessage request, ExecuteRequestAsync`1 executeRequestAsync)
at SSharp.SService.ExecuteRequestAsync[T](RequestUri uri, HttpMethod method, HttpContent content, String rootElement)
at SSharp.WebhookService.UpdateAsync(Int64 webhookId, Webhook webhook)
at PP.Technology.SCI.WAService.Channel.SWA.ActivateWebhooks(UserSC salesChannel) in D:\PP\PP.Service\src\PP.Technology.Core\SCI\WAService\Channel\SWA.cs:line 33
at PP.Technology.SCI.WAService.WAWorker.Execute() in D:\PP\PP.Service\src\PP.Technology.Core\SCI\WAService\WAWorker.cs:line 63
DEBUG 2019-10-21 14:37:40,448 [1 ] enancy.SubscriptionExpirationCheckWorker - Start background worker: PP.Technology.MultiTenancy.SubscriptionExpirationCheckWorker
DEBUG 2019-10-21 14:37:40,451 [1 ] cy.SubscriptionExpireEmailNotifierWorker - Start background worker: PP.Technology.MultiTenancy.SubscriptionExpireEmailNotifierWorker
INFO 2019-10-21 14:37:42,015 [1 ] fire.SqlServer.SqlServerObjectsInstaller - Start installing Hangfire SQL objects...
Here I logged the following lines which are actually useful to me and I would like to log them in separate files:
INFO 2019-10-21 14:37:25,980 [4 ] kActivatorService.WAWorker - Running WAWorker job
ERROR 2019-10-21 14:37:33,507 [4 ] kActivatorService.WAWorker - Failed to fix hooks for SCC with Id - 295
SSharp.SException: address: for this topic has already been taken
at SSharp.SService.CheckResponseExceptions(HttpResponseMessage response, String rawResponse)
at SSharp.SService.<>c__DisplayClass25_0`1.<<ExecuteRequestAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at SSharp.DefaultRequestExecutionPolicy.Run[T](CloneableRequestMessage request, ExecuteRequestAsync`1 executeRequestAsync)
at SSharp.SService.ExecuteRequestAsync[T](RequestUri uri, HttpMethod method, HttpContent content, String rootElement)
at SSharp.WebhookService.UpdateAsync(Int64 webhookId, Webhook webhook)
at PP.Technology.SCI.WAService.Channel.SWA.ActivateWebhooks(UserSC salesChannel) in D:\PP\PP.Service\src\PP.Technology.Core\SCI\WAService\Channel\SWA.cs:line 33
at PP.Technology.SCI.WAService.WAWorker.Execute() in D:\PP\PP.Service\src\PP.Technology.Core\SCI\WAService\WAWorker.cs:line 63
Thanks maliming. It worked after clearing cache
@maliming, I used the following SQL:
Update AbpSettings Set Value = 'en' where Name = 'Abp.Localization.DefaultLanguageName'
But this does not seem to work. The language is still different. Can you provide me the sql?
Hi @maliming,
I updated the hangfire packages. Seems to be working fine now. Thanks :)
Hi @ismcagdas,
the webapp was running fine. Only issue with the hangfire server that was shutdown. 0 servers and 1100+ queued background jobs
@xugowebtem,
We only allow default theme on our website, so it is relatively easy to manage theme.
In my project, I changed the color in demo1 (default) and compiled the css filed and replaced with default theme in AspNetZero metronic assets.
We choose this approach because we only change primary color of metronic and it is not so common to change the original code of metronic. Better to add overrides to the theme in our own code :)
Hi @ismcagdas,
Can you check with metronic theme if changing of primary color is possible in Metronic V6? :)
How can I control background jobs when I am running 2 instances of the application at same location?
I'm using Azure. Under Scale out option, I can add multiple instances to my application. Source code will be same for these instances. Is it possible to control background job someway?
Hi @ismcagdas, @aaron, I'm using Hangfire to manage background jobs.
Should I also add a check on UseHangfireServer
in Startup.cs?