Changeset 13870


Ignore:
Timestamp:
Jan 26, 2013, 7:17:58 PM (8 years ago)
Author:
livings124
Message:

update Mac code for logging changes in r13868

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r13828 r13870  
    270270                A2AB883E16A399A6008FAD50 /* VDKQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AB883C16A399A6008FAD50 /* VDKQueue.m */; };
    271271                A2AF1C390A3D0F6200F1575D /* FileOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */; };
     272                A2AF23C816B44FA0003BC59E /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = A2AF23C616B44FA0003BC59E /* log.c */; };
     273                A2AF23C916B44FA0003BC59E /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = A2AF23C716B44FA0003BC59E /* log.h */; };
    272274                A2B3FB460E5901E700FF78FB /* cli.c in Sources */ = {isa = PBXBuildFile; fileRef = A2B3FB450E5901E700FF78FB /* cli.c */; };
    273275                A2B3FB4C0E59023000FF78FB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
     
    975977                A2AF1C360A3D0F6200F1575D /* FileOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FileOutlineView.h; path = macosx/FileOutlineView.h; sourceTree = "<group>"; };
    976978                A2AF1C370A3D0F6200F1575D /* FileOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileOutlineView.m; path = macosx/FileOutlineView.m; sourceTree = "<group>"; };
     979                A2AF23C616B44FA0003BC59E /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = libtransmission/log.c; sourceTree = "<group>"; };
     980                A2AF23C716B44FA0003BC59E /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = log.h; path = libtransmission/log.h; sourceTree = "<group>"; };
    977981                A2B3FB450E5901E700FF78FB /* cli.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cli.c; path = cli/cli.c; sourceTree = "<group>"; };
    978982                A2B5BB7A0D9C7C2300FCB650 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = macosx/es.lproj/AddWindow.xib; sourceTree = "<group>"; };
     
    17291733                                A2EA522F1686AC0D00180493 /* quark.c */,
    17301734                                A2EA52301686AC0D00180493 /* quark.h */,
     1735                                A2AF23C616B44FA0003BC59E /* log.c */,
     1736                                A2AF23C716B44FA0003BC59E /* log.h */,
    17311737                                A2A4EA0B0DE106E8000CE197 /* ConvertUTF.h */,
    17321738                                A2A4EA0A0DE106E8000CE197 /* ConvertUTF.c */,
     
    20702076                                A25BFD6E167BED3B0039D1AA /* variant.h in Headers */,
    20712077                                A2EA52321686AC0D00180493 /* quark.h in Headers */,
     2078                                A2AF23C916B44FA0003BC59E /* log.h in Headers */,
    20722079                        );
    20732080                        runOnlyForDeploymentPostprocessing = 0;
     
    26772684                                A25BFD6D167BED3B0039D1AA /* variant.c in Sources */,
    26782685                                A2EA52311686AC0D00180493 /* quark.c in Sources */,
     2686                                A2AF23C816B44FA0003BC59E /* log.c in Sources */,
    26792687                        );
    26802688                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/macosx/Controller.m

    r13833 r13870  
    280280        tr_variantDictAddBool(&settings, TR_KEY_incomplete_dir_enabled, [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]);
    281281        tr_variantDictAddBool(&settings, TR_KEY_lpd_enabled, [fDefaults boolForKey: @"LocalPeerDiscoveryGlobal"]);
    282         tr_variantDictAddInt(&settings, TR_KEY_message_level, TR_MSG_DBG);
     282        tr_variantDictAddInt(&settings, TR_KEY_message_level, TR_LOG_DEBUG);
    283283        tr_variantDictAddInt(&settings, TR_KEY_peer_limit_global, [fDefaults integerForKey: @"PeersTotal"]);
    284284        tr_variantDictAddInt(&settings, TR_KEY_peer_limit_per_torrent, [fDefaults integerForKey: @"PeersTorrent"]);
  • trunk/macosx/MessageWindowController.m

    r13868 r13870  
    2828#import "NSMutableArrayAdditions.h"
    2929#import "NSStringAdditions.h"
     30#import <log.h>
    3031#import <transmission.h>
    31 #import <utils.h>
    3232
    3333#define LEVEL_ERROR 0
     
    115115    switch ([[NSUserDefaults standardUserDefaults] integerForKey: @"MessageLevel"])
    116116    {
    117         case TR_MSG_ERR:
     117        case TR_LOG_ERROR:
    118118            [fLevelButton selectItemAtIndex: LEVEL_ERROR];
    119119            break;
    120         case TR_MSG_INF:
     120        case TR_LOG_INFO:
    121121            [fLevelButton selectItemAtIndex: LEVEL_INFO];
    122122            break;
    123         case TR_MSG_DBG:
     123        case TR_LOG_DEBUG:
    124124            [fLevelButton selectItemAtIndex: LEVEL_DEBUG];
    125125            break;
    126126        default: //safety
    127             [[NSUserDefaults standardUserDefaults] setInteger: TR_MSG_ERR forKey: @"MessageLevel"];
     127            [[NSUserDefaults standardUserDefaults] setInteger: TR_LOG_ERROR forKey: @"MessageLevel"];
    128128            [fLevelButton selectItemAtIndex: LEVEL_ERROR];
    129129    }
     
    271271        switch (level)
    272272        {
    273             case TR_MSG_ERR:
     273            case TR_LOG_ERROR:
    274274                return [NSImage imageNamed: @"RedDot"];
    275             case TR_MSG_INF:
     275            case TR_LOG_INFO:
    276276                return [NSImage imageNamed: @"YellowDot"];
    277             case TR_MSG_DBG:
     277            case TR_LOG_DEBUG:
    278278                return [NSImage imageNamed: @"PurpleDot"];
    279279            default:
     
    343343    {
    344344        case LEVEL_ERROR:
    345             level = TR_MSG_ERR;
     345            level = TR_LOG_ERROR;
    346346            break;
    347347        case LEVEL_INFO:
    348             level = TR_MSG_INF;
     348            level = TR_LOG_INFO;
    349349            break;
    350350        case LEVEL_DEBUG:
    351             level = TR_MSG_DBG;
     351            level = TR_LOG_DEBUG;
    352352            break;
    353353        default:
     
    536536    switch (level)
    537537    {
    538         case TR_MSG_ERR:
     538        case TR_LOG_ERROR:
    539539            levelString = NSLocalizedString(@"Error", "Message window -> level");
    540540            break;
    541         case TR_MSG_INF:
     541        case TR_LOG_INFO:
    542542            levelString = NSLocalizedString(@"Info", "Message window -> level");
    543543            break;
    544         case TR_MSG_DBG:
     544        case TR_LOG_DEBUG:
    545545            levelString = NSLocalizedString(@"Debug", "Message window -> level");
    546546            break;
  • trunk/macosx/Torrent.m

    r13845 r13870  
    2929#import "TrackerNode.h"
    3030
     31#import "log.h"
    3132#import "transmission.h" // required by utils.h
    3233#import "utils.h" // tr_new()
     
    99100        NSString * oldPath = [NSString stringWithUTF8String: oldPathCharString];
    100101        NSString * path = [oldPath stringByDeletingLastPathComponent];
    101         NSString * oldName = [oldPath lastPathComponent];
    102102        NSString * newName = [NSString stringWithUTF8String: newNameCharString];
    103103       
    104104        if (error == 0)
    105105        {
     106            NSString * oldName = [oldPath lastPathComponent];
    106107            void (^__block updateNodeAndChildrenForRename)(FileListNode *) = ^(FileListNode * node) {
    107108                [node updateFromOldName: oldName toNewName: newName inPath: path];
     
    379380    if (fResumeOnWake)
    380381    {
    381         tr_ninf( fInfo->name, "restarting because of wakeUp" );
     382        tr_logAddNamedInfo( fInfo->name, "restarting because of wakeUp" );
    382383        tr_torrentStart(fHandle);
    383384    }
     
    855856- (void) renameFileNode: (FileListNode *) node withName: (NSString *) newName completionHandler: (void (^)(BOOL didRename)) completionHandler
    856857{
    857     NSParameterAssert(node != nil);
    858858    NSParameterAssert([node torrent] == self);
    859859    NSParameterAssert(newName != nil);
Note: See TracChangeset for help on using the changeset viewer.