Files: added logging
This commit is contained in:
parent
30692753bf
commit
496d7d2d48
@ -207,11 +207,15 @@ public class RoomLogoManager
|
||||
{
|
||||
var index = fileName.LastIndexOf('.');
|
||||
var fileNameWithoutExt = (index != -1) ? fileName.Substring(0, index) : fileName;
|
||||
|
||||
try
|
||||
{
|
||||
await DataStore.DeleteFilesAsync(TempDomainPath, "", fileNameWithoutExt + "*.*", false);
|
||||
}
|
||||
catch { }
|
||||
catch(Exception e)
|
||||
{
|
||||
_logger.ErrorRemoveTempPhoto(e);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<string> SaveWithProcessAsync<T>(T id, byte[] imageData, long maxFileSize, Point position, Size cropSize)
|
||||
|
@ -30,4 +30,7 @@ public static partial class RoomLogoManagerLogger
|
||||
{
|
||||
[LoggerMessage(Level = LogLevel.Error, Message = "RemoveRoomLogo")]
|
||||
public static partial void ErrorRemoveRoomLogo(this ILogger<RoomLogoManager> logger, Exception exception);
|
||||
|
||||
[LoggerMessage(Level = LogLevel.Error, Message = "RemoveTempPhoto")]
|
||||
public static partial void ErrorRemoveTempPhoto(this ILogger<RoomLogoManager> logger, Exception exception);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user