<commit_before>package apptail

import (
	"github.com/ActiveState/doozerconfig"
	"github.com/ActiveState/log"
	"stackato/server"
)

var Config struct {
	MaxRecordSize int    `doozer:"logyard/config/apptail/max_record_size"`
	NatsUri       string `doozer:"cloud_controller/config/mbus"`
}

func LoadConfig() {
	conn, headRev, err := server.NewDoozerClient("apptail")
	if err != nil {
		log.Fatal(err)
	}

	key := "/proc/"

	doozerCfg := doozerconfig.New(conn, headRev, &Config, key)
	err = doozerCfg.Load()
	if err != nil {
		log.Fatal(err)
	}

	// Watch for config changes in doozer
	go doozerCfg.Monitor(key+"*", func(change *doozerconfig.Change, err error) {
		if err != nil {
			log.Fatalf("Error processing config change in doozer: %s", err)
			return
		}
		log.Infof("Config changed in doozer; %+v\n", change)
	})
}<commit_msg>fix apptail regression;  Bug #98091<commit_after>package apptail

import (
	"github.com/ActiveState/doozerconfig"
	"github.com/ActiveState/log"
	"stackato/server"
)

var Config struct {
	MaxRecordSize int `doozer:"logyard/config/apptail/max_record_size"`
}

func LoadConfig() {
	conn, headRev, err := server.NewDoozerClient("apptail")
	if err != nil {
		log.Fatal(err)
	}

	server.Init(conn, headRev)

	key := "/proc/"

	doozerCfg := doozerconfig.New(conn, headRev, &Config, key)
	err = doozerCfg.Load()
	if err != nil {
		log.Fatal(err)
	}

	// Watch for config changes in doozer
	go doozerCfg.Monitor(key+"*", func(change *doozerconfig.Change, err error) {
		if err != nil {
			log.Fatalf("Error processing config change in doozer: %s", err)
			return
		}
		log.Infof("Config changed in doozer; %+v\n", change)
	})
}
{'fraction_non_alphanumeric': 0.14484848484848484, 'fraction_numerical': 0.0030303030303030303, 'mean_word_length': 4.159375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6407971', 'n_tokens_mistral': 663, 'n_tokens_neox': 623, 'n_words': 139}