更改gitolite日志默认位置

时间:2015-08-03 15:52:33

标签: git logging gitolite

我在linux Centos中使用gitolite版本3.6.3

我需要更改gitolite日志的默认位置

 @Override
    protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);

    if(mBitmap!=null){
    canvas.drawBitmap(drawableBitmap, 0, 0, mBitmapPaint);
    System.out.println("NOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT");

    canvas.drawPath( mPath,  mPaint);

    canvas.drawPath( circlePath,  circlePaint);}
    else
        System.out.println("I am nullllllllllllllllllllllllllllllllllllllllllllllllllllllll");
    }

    private float mX, mY;
    private static final float TOUCH_TOLERANCE = 4;

    private void touch_start(float x, float y) {
    mPath.reset();
    mPath.moveTo(x, y);
    mX = x;
    mY = y;
    }
    private void touch_move(float x, float y) {
    float dx = Math.abs(x - mX);
    float dy = Math.abs(y - mY);
    if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) {
         mPath.quadTo(mX, mY, (x + mX)/2, (y + mY)/2);
        mX = x;
        mY = y;

        circlePath.reset();
        circlePath.addCircle(mX, mY, 30, Path.Direction.CW);
    }
    }
    private void touch_up() {


        mPath.lineTo(mX, mY);
    circlePath.reset();
    // commit the path to our offscreen
    if(mCanvas!=null)
    mCanvas.drawPath(mPath,  mPaint);

    else

        System.out.println("I AM MCANVASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
    // kill this so we don't double draw
    mPath.reset();
    }

    @Override
    public boolean onTouch(View arg0, MotionEvent arg1) {
    float x = arg1.getX();
    float y = arg1.getY();

    switch (arg1.getAction()) {
        case MotionEvent.ACTION_DOWN:
            touch_start(x, y);
            invalidate();
            break;
        case MotionEvent.ACTION_MOVE:
            touch_move(x, y);
            invalidate();
            break;
        case MotionEvent.ACTION_UP:
            touch_up();
            invalidate();
            break;
    }
    return true;
    }

这样的自定义位置
~/.gitolite/logs/gitolite-%y-%m.log

我已尝试使用

编辑 .gitolite.rc 文件来实现此目的
/home/my_account/Desktop/gitolite-logs/gitolite-%y-%m.log

但我没有运气。 我错过了什么吗?

1 个答案:

答案 0 :(得分:1)

您可以在src/lib/Gitolite/Rc.pm中查看LOG_DEST的各种值。

实际文件来自$ENV{GL_LOGFILE}:请src/lib/Gitolite/Common.pm,默认为~/.gitolite/logs/gitolite-%y-%m.logcomputed by gen_lfn

所以请将LOG_DEST留给,例如' normal',并将环境变量GL_LOGFILE设置为您想要的路径(它代表&# 34; logdir"。)

OP Angelo报告in the comments必须添加到.bashrc

export GL_LOGFILE=/home/my_account/Desktop/gitolite-logs/gitolite.log

如果你需要添加一些时间戳:

export GL_LOGFILE='/home/my_account/Desktop/gitolite-logs/gitolite-'$(date +%Y-%m-%d)'.log'